Alpine-powered container for Amazon Web Services CLI
You can simply run this container using
docker run -i --rm mini/aws-cli help
This container will not have access to your credentials, but you can expose
them using AWS supported environment variables (
docker run -i -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY --rm mini/aws-cli help
Above example will pass your current environment variables into the container.
You can also use
Another approach will be sharing your
~/.aws directory instead, mounting
the volume against
/home/aws/.aws of the container:
docker run -i -v $HOME/.aws:/home/aws/.aws --rm mini/aws-cli help
As convenience to reduce typing, two convenience scripts are provided within
You can copy those and place them either your project's
bin directory or
somewhere along the
$PATH for easy invocation.
This container also exposes
/data as bind mount volume and can be used when
copying local content to a target (S3 bucket) might be required:
docker run -i -v $PWD:/data --env-file creds mini/aws-cli s3 sync s3://my-bucket my-copy
Work on this was made possible thanks to AREA 17.
All code contained in this repository, unless explicitly stated, is
licensed under MIT license.
A copy of the license can be found inside the LICENSE file.