Public | Automated Build

Last pushed: 2 years ago
Short Description
Small Docker image to run the AWS CLI on a CoreOS instance
Full Description

A way to use the AWS CLI through docker.

If you're on e.g. CoreOS and you don't want to have to install Python or other libraries, use Docker to access S3.

Getting set up

See on how to get your access key and credentials

After you have those, run this command to save your AWS creds locally (to the folder /my/current/directory/.awscreds)

docker run --rm -t -i -v $(pwd)/.awscreds:/root/.aws demandbase/aws-cli-docker configure

Not needed if you have AWS IAM access ^^

Build it, they will come:

Enter your key ID and secret (and any other information) at the prompts. These are now saved at ./creds/

Use the AWS CLI

From the same directory:

docker run --rm -t -i -v $(pwd)/.awscreds:/root/.aws demandbase/aws-cli-docker my aws commands

If you want to be able to run this from any directory on your machine, replace $(pwd) in both commands with /some/absolute/path


See objects in an S3 bucket:

docker run --rm -t -i -v $(pwd)/.awscreds:/root/.aws demandbase/aws-cli-docker s3 ls s3://my-s3-bucket

For more use see

Build docker helper to run aws commands inside the container. This is helpful if you want to

later copy those commands over using docker cp

docker build -t demandbase/aws-cli-docker:helper -f Dockerfile.helper .


docker run -v $(pwd):/artifacts/ -v ~/.aws/credentials:/root/.aws/credentials -it demandbase/aws-cli-docker:helper --recursive s3 cp s3://demandbase-devops/newrelic .
Docker Pull Command
Source Repository