AWS Developer Tools Blog
New: AWS CLI v2 Docker images available on Amazon ECR Public
We are excited to announce that official Docker images of the AWS Command Line Interface (AWS CLI) v2 are now available on Amazon Elastic Container Registry Public (Amazon ECR Public) gallery. Customers will now be able to pull all past and future images of the AWS CLI v2 from Amazon ECR Public. Previously, official AWS CLI v2 images were only published to Docker Hub.
Amazon ECR Public offers reliable availability around the world via geo-replication. Data transferred from a public repository is free up to the limits specified (and can be done anonymously). For information on free tiers and pricing, please visit the Amazon Elastic Container Registry (Amazon ECR) pricing page. You can also visit the Amazon ECR user guide for general usage help.
To pull the AWS CLI v2 images from Amazon ECR Public, you can pass the repository’s URI to a docker pull command. For example, to pull the latest version of the AWS CLI v2:
$ docker pull public.ecr.aws/aws-cli/aws-cli:latest
And to pull a specific version:
$ docker pull public.ecr.aws/aws-cli/aws-cli:2.9.1
The interface for using the Docker image remains unchanged. Simply point to the image pulled from Amazon ECR Public and the passed arguments will be proxied to the AWS CLI inside of the container. The following example is equivalent to running aws --version
:
$ 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.10.47-linuxkit docker/aarch64.amzn.2 prompt/off
For more information, please visit the Amazon ECR Public repository and the user guide for the AWS CLI v2. For any issues or feature requests related to the Docker image, please file an issue on our GitHub repository. We look forward to hearing your feedback.