Sign inSign up

rkhtech/awscli

By rkhtech

Updated almost 8 years ago

Automated Build

Image
1

1.4K

rkhtech/awscli repository overview

AWSCLI Version:

aws-cli/1.15.5 Python/2.7.14 Linux/4.4.0-98-generic botocore/1.10.5
I used the following AWS documentation to install the awscli into the container:

Installing the AWS Command Line Interface

Docker Hub Location

rkhtech/awscli

Installation

docker pull rkhtech/awscli

Usage

Basic example
$ docker run -i --rm rkhtech/awscli aws --version
aws-cli/1.15.5 Python/2.7.14 Linux/4.4.0-98-generic botocore/1.10.5

OR

$ alias aws='docker run -i rkhtech/awscli aws'
$ aws --version
aws-cli/1.15.5 Python/2.7.14 Linux/4.4.0-98-generic botocore/1.10.5

Note: If the container is installed on an EC2 instance, credentials are granted by way of a Role assigned to the Instance the container runs on. One gotcha is that you will still need to provide the default region to your commands (see below).

Example using environment variables to pass credentials into container
docker run -i --rm \
    -e AWS_DEFAULT_REGION=us-west-2 \
    -e AWS_ACCESS_KEY_ID=AKIAI67VIZ62T5I76Z6Q \
    -e AWS_SECRET_ACCESS_KEY=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 \
    rkhtech/awscli \
    aws ec2 describe-instances

Note: These credentials have been removed and are no longer valid credentials.

Passing default region to container
Passing as an environment variable to the container:
docker run -i --rm -e AWS_DEFAULT_REGION=us-west-2 rkhtech/awscli aws ec2 describe-instances
Passing as an option to the aws cli:
docker run -i --rm rkhtech/awscli aws ec2 describe-instances --region=us-west-2

Tag summary

Content type

Image

Digest

Size

36.7 MB

Last updated

almost 8 years ago

docker pull rkhtech/awscli