Enter in AWS

Install local curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install aws --version Running the official AWS CLI version 2 Docker image The official AWS CLI version 2 Docker image is hosted on DockerHub in the amazon/aws-clirepository. The first time you use the docker run command, the latest Docker image is downloaded to your computer. Each

Install local curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install aws --version Running the official AWS CLI version 2 Docker image The official AWS CLI version 2 Docker image is hosted on DockerHub in the amazon/aws-clirepository. The first time you use the docker run command, the latest Docker image is downloaded to your computer. Each

Install local

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --version

Running the official AWS CLI version 2 Docker image

The official AWS CLI version 2 Docker image is hosted on DockerHub in the amazon/aws-clirepository. The first time you use the docker run command, the latest Docker image is downloaded to your computer. Each subsequent use of the docker run command runs from your local copy.

To run the AWS CLI version 2 Docker image, use the docker run command.

$ docker run --rm -it amazon/aws-cli command

The command is how the command functions:

  • Thedocker run --rm --it amazon/aws-cli is the equivalent to the aws executable. Each time you run this command, Docker spins up a container of your downloaded amazon/aws-cli image, and executes your aws command. By default, the Docker image uses the latest version of the AWS CLI version 2.For example, to call the aws --version command in Docker, you run the following.
  • $ docker run --rm -it amazon/aws-cli --version 
    aws-cli/2.0.6 Python/3.7.3 Linux/4.9.184-linuxkit botocore/2.0.0dev10
    
  • The --rm specifies to clean up the container after the command exits.
  • The -it specifies to open a pseudo-TTY with stdin. This allows you to provide input to the AWS CLI version 2 while it’s running in a container, for example, by using the aws configureand aws help commands.

For more information about thedocker runcommand, see the Docker reference guide

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments