Using docker for aws command line utility

0 votes

This command works as expected:

# docker run --rm -it public.ecr.aws/aws-cli/aws-cli:2.9.1 --version
aws-cli/2.9.1 Python/3.9.11 Linux/5.15.0-1026-aws docker/aarch64.amzn.2 prompt/off

But this does not:

# docker run --rm -it public.ecr.aws/aws-cli/aws-cli:2.9.1 s3 ls
Unable to locate credentials. You can configure credentials by running "aws configure".

Nor can I configure AWS credentials...

# docker run -it public.ecr.aws/aws-cli/aws-cli:2.9.1 aws configure

I am not sure how to use docker for aws command.


Update:

This seems to work as expected:

$ docker run --rm -it -v ~/.aws:/root/.aws  public.ecr.aws/aws-cli/aws-cli:2.9.1 s3 ls

But in my case, I do not have credentials saved locally. Isn't the docker container recommended in such cases?

Dec 22, 2022 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 9 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP