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

S3Storage - pull AWS_SESSION_TOKEN from environment #1398

Closed
samdoolin opened this issue May 5, 2024 · 2 comments · Fixed by #1399
Closed

S3Storage - pull AWS_SESSION_TOKEN from environment #1398

samdoolin opened this issue May 5, 2024 · 2 comments · Fixed by #1399

Comments

@samdoolin
Copy link
Contributor

S3Storage looks for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in settings and in os.environ.

"access_key": setting(

However it only looks for AWS_SESSION_TOKEN in settings but not in os.environ.

"security_token": setting(

All 3 are used to initialise the the boto3.Session.

session = boto3.Session(

Please consider allowing security_token to fall back to os.environ as well?
Otherwise I need to manually wire AWS_SESSION_TOKEN into settings to avoid url failures (InvalidAccessKeyId).
And/or describe how AWS_SESSION_TOKEN is handled in the docs.

Thanks

@jschneier
Copy link
Owner

Sure, please open a PR

@samdoolin
Copy link
Contributor Author

does #1399 look ok?

@jschneier jschneier linked a pull request May 9, 2024 that will close this issue
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 a pull request may close this issue.

2 participants