Sign inSign up

ajdonnison/aws-cli

By ajdonnison

Updated almost 2 years ago

Docker image of AWS CLI v2, kept up to date with the official AWS build.

Image
0

3.4K

ajdonnison/aws-cli repository overview

AWS CLI v2 builds

Based on the official AWS github release of the AWS CLI, each release is mapped to a docker image using the same version. Currently all images are x86_64 alpine images.

Background

The new version of AWS CLI (v2) is no longer published via pypi. Instead it needs to be downloaded and installed from AWS. This caused complications when building docker images. This docker image can be used to both supply the command as a docker command:

docker run ajdonnison/aws-cli:latest s3 ls s3://some-bucket/

You can also build the extracted AWS command into your own docker using a line like below in your Dockerfile:

COPY --from=ajdonnison/aws-cli:latest-alpine /usr/local/aws-cli /usr/local/aws-cli

Passing credentials

The easiest way if you have a .aws directory already with credentials is:

docker run -v ${HOME}/.aws:/root/.aws -e AWS_PROFILE=default ajdonnison/aws-cli s3 ls s3://some-bucket/

Setting the AWS_PROFILE is optional but useful if, like me, you have multiple profiles set up.

Tag summary

Content type

Image

Digest

sha256:fa0071471

Size

225.6 MB

Last updated

almost 2 years ago

docker pull ajdonnison/aws-cli