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

Add account ID to static credentials providers #3348

Open
wants to merge 3 commits into
base: account-id-endpoint-routing
Choose a base branch
from

Conversation

alexgromero
Copy link
Contributor

@alexgromero alexgromero commented Jan 22, 2025

This PR introduces account ID to SharedCredentialProvider and ConfigProvider. The update allows users to specify an aws_account_id variable either in the shared credentials file, config file, or during client creation. The account ID will then be associated with the credentials when they are loaded.

@alexgromero alexgromero changed the title Add account ID to Static Credential Provider Add account ID to static credential provider Jan 22, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (account-id-endpoint-routing@d308ceb). Learn more about missing BASE report.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                      Coverage Diff                       @@
##             account-id-endpoint-routing    #3348   +/-   ##
==============================================================
  Coverage                               ?   93.17%           
==============================================================
  Files                                  ?       66           
  Lines                                  ?    14437           
  Branches                               ?        0           
==============================================================
  Hits                                   ?    13452           
  Misses                                 ?      985           
  Partials                               ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexgromero alexgromero changed the title Add account ID to static credential provider Add account ID to static credentials provider Jan 23, 2025
@alexgromero alexgromero changed the title Add account ID to static credentials provider Add account ID to static credentials providers Jan 23, 2025
botocore/session.py Outdated Show resolved Hide resolved
botocore/session.py Outdated Show resolved Hide resolved
@jonathan343
Copy link
Contributor

I think these changes look good. The only thing I'd suggest is adding a test that verifies the correct precedence for account_id if specified in multiple places such as the shared config file, environment variable, client creation parameter, ...

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

Successfully merging this pull request may close these issues.

3 participants