Coder Social home page Coder Social logo

aws-cli's Introduction

AWS CLI in Docker

Containerized AWS CLI on alpine to avoid requiring the aws cli to be installed on CI machines.

Build

docker build -t mesosphere/aws-cli .

Automated build on Docker Hub

DockerHub Badge

Usage

Configure:

export AWS_ACCESS_KEY_ID="<id>"
export AWS_SECRET_ACCESS_KEY="<key>"
export AWS_DEFAULT_REGION="<region>"

Upload file to S3:

./aws.sh s3 cp ../dcos-centos-virtualbox-0.2.1.box s3://downloads.dcos.io/dcos-vagrant/

Caveat: Because aws.sh mounts the current directory as /project, paths to local files must be relative to the current directory.

Install

To use aws.sh as a drop-in replacement for calls to the aws-cli, use one of the following methods:

Add an alias to your shell:

alias aws='docker run --rm -t $(tty &>/dev/null && echo "-i") -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}" -v "$(pwd):/project" mesosphere/aws-cli'

Or drop it into your path named aws:

curl -o /usr/local/bin/aws https://raw.githubusercontent.com/mesosphere/aws-cli/master/aws.sh && chmod a+x /usr/local/bin/aws

Maintenance

  • The Docker image build & publish is automated by DockerHub for master commits and tags.
  • The awscli and s3cmd packages have handcoded versions in the Dockerfile that need to be bumped manually.

References

AWS CLI Docs: https://aws.amazon.com/documentation/cli/

License

Copyright 2016-2017 Mesosphere, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this repository except in compliance with the License.

The contents of this repository are solely licensed under the terms described in the LICENSE file included in this repository.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

aws-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-cli's Issues

Assume role

Maybe a stupid question sorry: I would like to use this image in a CI, but I need to do an assume role for that. Is there a way to do an assume role easily with it? It would be a nice addition to have a helper script I think. If you think this is good, I will make a PR for this.

aws ecr login invalid character \r in hostname

I'm using this mesosphere/aws-cli container in my CI pipeline for purpose of pushing an docker image to AWS ECR and below is my sh step of Jenkins Pipeline

sh """ alias aws='docker run --rm -t \$(tty &>/dev/null && echo "-i") -e AWS_ACCESS_KEY_ID=xxxxxx -e AWS_SECRET_ACCESS_KEY=xxxxxx -e AWS_DEFAULT_REGION=ap-south-1 -v \$(pwd):/project mesosphere/aws-cli' \$(aws ecr get-login --no-include-email) """

Output of this step during Jenkins build is:

......dmQxNTJrVzBIQVFEa1RESDJQUE0xUFJSbDg3bDFaRU5XMlYxenYzMEEvNUdLVWNDeVRhZGYyS0hoMnkvM3h1aC9Ta1VLdy9sQTcvK3NHYWFRUkUzUGZJRW5XR3c3T010QmErd2hlZFRhL1JLa3ciLCJkYXRha2V5IjoiQVFJQkFIaUhXYVlUblJVV0NibnorN0x2TUcrQVB2VEh6SGxCVVE5RnFFbVYyNkJkd3dHWlp3cW9vVVJTcUFBblNVY1RQdnBYQUFBQWZqQjhCZ2txaGtpRzl3MEJCd2FnYnpCdEFnRUFNR2dHQ1NxR1NJYjNEUUVIQVRBZUJnbGdoa2dCWlFNRUFTNHdFUVFNMG1kV2VuM3VrYXFPNEJyaUFnRVFnRHVPOWdXVVJtTkhEc3JrZC9YSkRWdlQ5Y0JORGpnU1dzbFQxMHpqSzVUV3VabWJpdVFZQThrZGxoeVFBM2xTREsyWlBETHlNVkFVdW12NVJBPT0iLCJ2ZXJzaW9uIjoiMiIsInR5cGUiOiJEQVRBX0tFWSIsImV4cGlyYXRpb24iOjE1NTA5NTE0MDV9 'https://xxxxxxxxxxx.dkr.ecr.ap-south-1.amazonaws.com ' WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: unable to parse server address: parse https://xxxxxxxxxxx.dkr.ecr.ap-south-1.amazonaws.com : invalid character "\r" in host name

1.14

Any plans to update the CLI version? Important command in there is cloudformation deploy which takes away a lot of the if not exists then create hassle.

aws secretsmanager

Hi,

would you consider to update the cli version to 1.15.8 or later
to support secretsmanager?
reference link: here

Thanks

Apply versioning in Docker tags

I would like to request that this project be uploaded to DockerHub with specific version numbers (ideally following Semver) instead of just always using a latest tag.

This way, I know that my Docker-based stack, using mesosphere/aws-cli as a base Docker image in its Dockerfile, will have more deterministic behaviour instead of always pulling in the bleeding edge. Not to say that I don't trust that the mesosphere/aws-cli Docker image is not trustworthy enough to begin introducing bugs. However, all other Docker images that our project pulls are through specific versioning in the image tags, so that it is an explicit action to upgrade a pulled Docker image.

Thank you.

Update awscli

Could you please run the Docker Hub build again or tag different (up-to-date) Image versions?
The awscli version is a bit outdated by now and this otherwise very useful Image doesn't work for us anymore.
@karlkfi

Add support for AWS_SESSION_TOKEN

The environment I am currently in uses temporary credentials, which makes use of a third environment variable: AWS_SESSION_TOKEN.

Is there any chance that support for that could be added in? (I would be happy to test :-)

Thanks,

-- Doug

ARM64 Support

Hi Team,

I am trying to use the aws-cli image on arm64 platform but it seems it is not available for arm64.

I have successfully built the image using the command docker build -t image_name . on the arm64 platform without any changes in the Dockerfile.

Do you have any plans on releasing arm64 images?

I am curious on how the amd64 image is getting published on Dockerhub.

It will be very helpful if the image is released with ARM64 support. If required, I am happy to contribute.

Update awscli

Would you mind running the Docker Hub build again? The awscli version is out of date and does not support some of the newer features that have been added.

@karlkfi opening based on #1

Cheers,
-Brian

wget can't access aws metadata

Hi,

I'm using your image for some automation and it worked great for a year or more but the new version of the image stopped working.

I was using the latest tag:
mesosphere/aws-cli latest f699e09bef16 10 months ago 97.8MB

and running this command inside:

aws ec2 associate-address --instance-id `wget -qO- http://169.254.169.254/latest/meta-data/instance-id` --allocation-id #ID# --allow-reassociation

Everything was fine but now with the new version I'm getting:
wget: error getting response

The same is for 1.11.188.

The problem seems to be this part: wget -qO- http://169.254.169.254/latest/meta-data/instance-id.

To replicate it you need to run it on AWS ec2 so it will have access to AWS meta-data url.

I've copied your working version to my docker hub account just to have a working image:
https://hub.docker.com/r/trandel/aws-cli/

I hope you will have some time to look at it.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.