feat: add AWS profile support for Bedrock credentials #10504
+61
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Summary
This PR adds AWS profile support for Bedrock credentials, enabling automatic credential refresh using the AWS SDK's credential provider chain. This
improvement allows users to configure AWS profiles with optional
credential_processfor seamless token rotation, eliminating the need to manuallyupdate static environment variables when credentials expire.
Key Changes:
BEDROCK_AWS_PROFILEenvironment variable support.env.examplewith comprehensive documentation on profile configuration and optional auto-refresh setupBenefits:
Change Type
Please delete any irrelevant options.
Testing
Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.
Test Configuration:
Environment Variables:
BEDROCK_AWS_DEFAULT_REGION=us-west-2 BEDROCK_AWS_PROFILE=my-bedrock-profile AWS Config (~/.aws/config): [profile my-bedrock-profile] region = us-west-2 credential_process = my-custom-refresh-command --format json # This can also be credential_process = node /path/to/LibreChat/config/get-aws-credentials.js or anything else...Test Steps:
Backward Compatibility Testing:
Checklist
Please delete any irrelevant options.
Test Suites: 1 skipped, 80 passed, 80 of 81 total