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

Pass AWS credentials from standard file to Docker #342

Open
huddlej opened this issue Dec 27, 2023 · 1 comment
Open

Pass AWS credentials from standard file to Docker #342

huddlej opened this issue Dec 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@huddlej
Copy link
Contributor

huddlej commented Dec 27, 2023

Context

Several modes of the CLI support AWS credential defined in the standard ~/.aws/credentials file including the AWS Batch mode and nextstrain remote actions outside of Docker. These credentials are accessible from nextstrain shell --conda ., for example, but when running the CLI with Docker locally, the AWS credentials are not available and the user receives the following error when trying to access AWS S3 resources:

Unable to locate credentials. You can configure credentials by running "aws configure".

Description

The Docker runtime should pass through AWS credentials from the user's standard credentials file.

Additional context

This issue came up during a related Slack discussion where a user wanted to use the Docker runtime but could not store their credentials in the standard format.

@huddlej huddlej added the enhancement New feature or request label Dec 27, 2023
@tsibley
Copy link
Member

tsibley commented Jan 10, 2024

I'm sympathetic to this need for sure. We could automatically mount ~/.aws/{config,credentials} into the right spot in containerized runtimes, and I think most of the time this would increase the DWIM quotient. (Some more advanced AWS config/credentials setups won't work when mounted into the container, but the vast majority will.) It does reduce the isolation of the containerized runtimes, however, and I'd think we'd want a flag to disable it. For example, we've recently walked back the long-standing automatic forwarding of env-based AWS credentials into containers by disabling that behaviour if you explicitly specify other env vars.

So this needs some consideration and care, but yeah, it'd probably be good to do it.

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

No branches or pull requests

2 participants