Setup AWS Bedrock with blank AKSK returns invalid_param error after upgrading to 0.14.1 #7276

Closed
opened 2026-02-21 18:19:47 -05:00 by yindo · 1 comment
Owner

Originally created by @ansoncsh on GitHub (Dec 18, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • 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.14.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  • Deploy Dify 0.14.1 to an EC2 with IAM role attached which has Bedrock access
  • In Settings > Model Provider, select Amazon Bedrock
  • Leave Access Key and Secret Access Key blank
  • Click "Save" > an error message is reported

✔️ Expected Behavior

Successfully setup without AKSK

Actual Behavior

An error message "aws_access_key_id" is reported. Needs to use AKSK to bypass the error.

The response from api is
{"code": "invalid_param", "message": "'aws_access_key_id'", "status": 400}

Screenshot 2024-12-18 at 9 31 46 PM

Originally created by @ansoncsh on GitHub (Dec 18, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.14.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce - Deploy Dify 0.14.1 to an EC2 with IAM role attached which has Bedrock access - In Settings > Model Provider, select Amazon Bedrock - Leave Access Key and Secret Access Key blank - Click "Save" > an error message is reported ### ✔️ Expected Behavior Successfully setup without AKSK ### ❌ Actual Behavior An error message "aws_access_key_id" is reported. Needs to use AKSK to bypass the error. The response from api is `{"code": "invalid_param", "message": "'aws_access_key_id'", "status": 400}` ![Screenshot 2024-12-18 at 9 31 46 PM](https://github.com/user-attachments/assets/36173972-0fa7-4f1f-ac26-a9a8e482f3ed)
yindo added the 🐞 bug label 2026-02-21 18:19:47 -05:00
yindo closed this issue 2026-02-21 18:19:47 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 18, 2024):

Hey @ansoncsh! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's tackle this issue together!

The issue you're encountering with the "invalid_param" error when setting up AWS Bedrock without providing Access Key and Secret Access Key (AKSK) in Dify 0.14.1 seems to be related to how the system handles AWS credentials. According to the configuration, if AWS credentials are not provided, they should be obtained from the running environment, such as an IAM role attached to your EC2 instance [1].

However, the error message you're seeing suggests that the system is not correctly falling back to use the IAM role credentials. This might be a bug introduced in version 0.14.1, where the expected behavior of using environment credentials is not functioning as intended.

To work around this issue, you might need to explicitly provide the AKSK for now, or check if there are any updates or patches available that address this problem. Additionally, reviewing any recent changes in the codebase related to AWS credential handling might provide further insights into the cause of this issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 18, 2024): <!-- Greeting --> Hey @ansoncsh! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's tackle this issue together! <!-- Answer --> The issue you're encountering with the "invalid_param" error when setting up AWS Bedrock without providing Access Key and Secret Access Key (AKSK) in Dify 0.14.1 seems to be related to how the system handles AWS credentials. According to the configuration, if AWS credentials are not provided, they should be obtained from the running environment, such as an IAM role attached to your EC2 instance <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/bedrock/bedrock.yaml)</sup>. However, the error message you're seeing suggests that the system is not correctly falling back to use the IAM role credentials. This might be a bug introduced in version 0.14.1, where the expected behavior of using environment credentials is not functioning as intended. To work around this issue, you might need to explicitly provide the AKSK for now, or check if there are any updates or patches available that address this problem. Additionally, reviewing any recent changes in the codebase related to AWS credential handling might provide further insights into the cause of this issue. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/4782ff3d-f77b-4a66-9761-a86159aed9e9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/4782ff3d-f77b-4a66-9761-a86159aed9e9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/4782ff3d-f77b-4a66-9761-a86159aed9e9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/4782ff3d-f77b-4a66-9761-a86159aed9e9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4782ff3d-f77b-4a66-9761-a86159aed9e9?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/4782ff3d-f77b-4a66-9761-a86159aed9e9?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7276