fix: embedding job fails using IAM role (#5252)

This commit is contained in:
Masashi Tomooka 2024-06-15 19:57:54 +09:00 committed by GitHub
parent 4f0488abb5
commit d9bee03ff6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ provider_credential_schema:
- variable: aws_access_key_id
required: false
label:
en_US: Access Key (If not provided, credentials are obtained from your running environment. e.g. IAM role)
en_US: Access Key (If not provided, credentials are obtained from the running environment.)
zh_Hans: Access Key
type: secret-input
placeholder:

View File

@ -49,8 +49,8 @@ class BedrockTextEmbeddingModel(TextEmbeddingModel):
bedrock_runtime = boto3.client(
service_name='bedrock-runtime',
config=client_config,
aws_access_key_id=credentials["aws_access_key_id"],
aws_secret_access_key=credentials["aws_secret_access_key"]
aws_access_key_id=credentials.get("aws_access_key_id", None),
aws_secret_access_key=credentials.get("aws_secret_access_key", None)
)
embeddings = []