Skip to content

michaelcohenunsw/dockerchallenge02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Example command to run aws cli inside a Docker container:

Change the values of environment variables AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY as required.

docker run --rm -it -e "AWS_DEFAULT_REGION=ap-southeast-2" -e "AWS_ACCESS_KEY_ID=KEYID" -e "AWS_SECRET_ACCESS_KEY=SECRETKEY" amazon/aws-cli:2.0.10 s3 ls

If you are running a Linux operating system you can create an alias to shorten this command:

$ alias aws='docker run --rm -it -e "AWS_DEFAULT_REGION=ap-southeast-2" -e "AWS_ACCESS_KEY_ID=KEYID" -e "AWS_SECRET_ACCESS_KEY=SECRETKEY" amazon/aws-cli:2.0.10'

aws s3 ls

About

Run the new AWS Linux CLI v2 in a docker container.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published