You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When bedrock's AKSK is left blank ( AWS environment configuration is automatically called), an error will be reported when using the rerank model
#11494
Closed
5 tasks done
FelixFeli opened this issue
Dec 9, 2024
· 3 comments
· Fixed by #11506
I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
Please do not modify this template :) and fill in all the required fields.
Dify version
0.13.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Deploy Dify on AWS EC2 and select Amazon Bedrock in Model Provider, Access Key and Secret Access Key Leave blank. At this time, the credentials owned by EC2 will be used by default to call bedrock. In the new version, when calling the newly added bedrock rerank model, an error will be reported without AKSK.
@FelixFeli Hello there! I'm here to assist you with any bugs, questions, or contributions you might have. If you need help with anything, feel free to ask!
To resolve the error "Partial credentials found, missing: aws_secret_access_key" when using the Bedrock rerank model with AKSK left blank in a self-hosted Dify deployment on AWS EC2, ensure that the aws_secret_access_key is provided in the credentials dictionary. This error occurs because the aws_secret_access_key is missing when initializing the boto3 client in the _invoke method of the BedrockRerankModel class.
Make sure that the credentials dictionary includes both aws_access_key_id and aws_secret_access_key. If these fields are left blank, you need to provide valid AWS credentials. Alternatively, ensure that your AWS environment is configured to provide these credentials automatically, such as through an IAM role attached to your EC2 instance with the necessary permissions.
Additionally, validate the credentials using the validate_provider_credentials method from the BedrockProvider class. Ensure that the environment variables AWS_REGION, AWS_ACCESS_KEY, and AWS_SECRET_ACCESS_KEY are set correctly. If using environment-based credentials, confirm that your EC2 instance has the appropriate IAM role attached [1][2].
FelixFeli
changed the title
When bedrock's AKSK is left blank (system configuration is automatically called), an error will be reported when using the rerank model
When bedrock's AKSK is left blank ( AWS environment configuration is automatically called), an error will be reported when using the rerank model
Dec 9, 2024
Self Checks
Dify version
0.13.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Deploy Dify on AWS EC2 and select Amazon Bedrock in Model Provider, Access Key and Secret Access Key Leave blank. At this time, the credentials owned by EC2 will be used by default to call bedrock. In the new version, when calling the newly added bedrock rerank model, an error will be reported without AKSK.
✔️ Expected Behavior
Successfully called bedrock rerank model
❌ Actual Behavior
[bedrock] Error: Partial credentials foundin explicit, missing: aws_secret_access_key
The text was updated successfully, but these errors were encountered: