satishweb/awscli

By satishweb

Updated about 4 years ago

Amazon Web Services Commandline Client (~140MB)

Image

1.4K

Amazon Web Services Commandline Client


Simple and lightweight ubuntu based Docker Image for Amazon web services command line tool (awscli)

Supported Platforms

Platforms
linux/amd64
linux/arm64
linux/arm/v7
Docker Image Types

Image TypeTag prefixUsage
CommandNONEThis image runs the aws command when launched with docker run with at least one parameter
Command Image type has default tags without any prefixes. For example "latest", "1.18.32".
Shellshell-This image is used for scripting use/automations where shell based command execution is needed
Shell Image type has default tags with prefix shell-. For example "shell-latest", "shell-1.18.32".
AWSCLI Versions

TAGAWSCLI VersionDocker Pull Command
latest1.18.32docker pull satishweb/awscli
shell-latest1.18.32docker pull satishweb/awscli:shell-latest
1.18.321.18.32docker pull satishweb/awscli:1.18.32
shell-1.18.321.18.32docker pull satishweb/awscli:shell-1.18.32
Command Image Type Usage

ActionCommand
Pulldocker pull satishweb/awscli
Rundocker run --rm -e AWS_ACCESS_KEY_ID=<key> -e AWS_SECRET_ACCESS_KEY=<secret> -e AWS_DEFAULT_REGION=<region> -it satishweb/awscli <command> <options>
Aliasaws(){dParam='run --rm -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION -it satishweb/awscli'; [[ "$1" ]] && eval docker $dParam $@ && return; eval docker $dParam help}
With Credsdocker run -i -t --rm -v mycredentialsfile:/root/.aws/credentials:ro satishweb/awscli <command> <options>

You can setup alias in ~/.bashrc or /etc/profile to make aws command available in each shell by default

Shell Image Type Usage

Command:docker run --rm -e AWS_ACCESS_KEY_ID=<key> -e AWS_SECRET_ACCESS_KEY=<secret> -e AWS_DEFAULT_REGION=<region> -it satishweb/awscli:shell-latest

This will open bash shell prompt. This image type should be used for all script/automation systems.

Useful Commands

ActionCommand
aws versiondocker run --rm -it satishweb/awscli --version
aws helpdocker run --rm -it satishweb/awscli help

If you run this image in AWS ECS then ensure you have atleast 40MB memory configured.

AWSCLI Configurations

We can write awscli config file and run docker image with it (see Usage section).

Credentials Config Example:

[default]

aws_access_key_id=XXXXXXXXXXX

aws_secret_access_key=xxxxxxxxxxxxxxxxxx

region=us-east-1

output=text

Found Issues?

***Please help me resolve issues that you notice by reporting them *** HERE

References

TitleReference
AWS Client Helphttps://aws.amazon.com/cli/
Ubuntu Docker Imagehttps://hub.docker.com/_/ubuntu/

Docker Pull Command

docker pull satishweb/awscli