Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Simplify logic around BEDROCK_AWS_ACCESS_KEY_ID and BEDROCK_AWS_SECRET_ACCESS_KEY #4484

Closed
1 task done
shinglyu opened this issue Oct 21, 2024 · 3 comments · Fixed by #4655
Closed
1 task done
Labels
enhancement New feature or request

Comments

@shinglyu
Copy link

What features would you like to see added?

Replace BEDROCK_AWS_ACCESS_KEY_ID and BEDROCK_AWS_SECRET_ACCESS_KEY with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, and rely on AWS SDK to simply the logic.

More details

If BEDROCK_AWS_ACCESS_KEY_ID and BEDROCK_AWS_SECRET_ACCESS_KEY is not provided, the AWS SDK will use its default credential resolution logic. In that logic, it will look for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. So directly passing the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY will be sufficient, and we can remove the custom logic around checking BEDROCK_-prefixed variants.

Also, for users using AWS STS CLI to assume roles, the user needs to pass the AWS_SESSION_TOKEN as well. In that case, customer need to pass this in .env:

AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here
AWS_SESSION_TOKEN=your_session_token_here

In this case, there is no BEDROCK_AWS_SESSION_TOKEN, and the BEDROCK_ ones make things complicated.

Which components are impacted by your request?

Endpoints

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shinglyu shinglyu added the enhancement New feature or request label Oct 21, 2024
@khfung
Copy link
Contributor

khfung commented Oct 21, 2024

I think it is good to have two different environment valuables because one is for the bedrock and another one is for rag
Just my view only

@shinglyu
Copy link
Author

@khfung Oh I wasn't aware of the RAG support. In that case maybe adding BEDROCK_AWS_SESSION_TOKEN is a better idea?

@ldavis9000aws
Copy link

ldavis9000aws commented Oct 24, 2024

Even so, we still need STS support for temporary credentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants