Skip to content

cn-docker/aws-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Cli Docker Image

Image containing the AWS Cli executable.

Usage

The image is ready to execute AWS Cli commands like:

    docker run cnservices/aws-cli <COMMAND>

To provide AWS credentials you have two alternatives:

Using environment variables

You can use environment the variables to authenticate the AWS Cli.

    docker run --env AWS_ACCESS_KEY_ID=<YOUR_ACCESS_KEY> --env AWS_SECRET_ACCESS_KEY=<YOUR_SECRET_KEY> cnservices/aws-cli <COMMAND>

Where:

  • AWS_ACCESS_KEY_ID: Specifies an AWS access key associated with an IAM user or role.
  • AWS_SECRET_ACCESS_KEY: Specifies the secret key associated with the access key. This is essentially the "password" for the access key.

Using AWS profiles

You can use your AWS profiles to authenticate the AWS Cli.

    docker run --volume ~/.aws/:/root/.aws/ cnservices/aws-cli <COMMAND>

Get into the container

To access the container you need to override the entry point:

    docker run -ti --entrypoint sh cnservices/aws-cli