How to install awscli >1.11.138 so I can use `aws ecr get-login`

awscli

#1

I am testing an app that lets a user deploy to an a repo on AWS and it involves using aws ecr get-login. However, this sequence of commands:

sudo apt-get update
sudo apt-get install -y python-pip python-dev
sudo pip install awscli
aws --version

gives aws-cli/1.4.2 Python/3.4.2 Linux/4.4.0-116-generic and with that version, there are no aws ecr commands.

How can I accomplish this? To be clear, this is meant to test some user’s ability to upload to the repo (so I have setup_remote_docker in the yaml).


#2

Do you mean that those commands were added in a version later than the one you have installed, or were added in an earlier version and have since been removed? What version of awscli would give you what you want?


#3

I’m using a node docker image that doesn’t have the awscli installed. Only versions of awscli after 1.9 have that command, and I need 1.11+ to do my aws ecr get-login cmand properly. Why is it installing 1.4 with those commands?


#4

I’m barely familiar with Pip, but specifying version numbers explicitly has worked for me when installing DC:

apk --update add 'py-pip==9.0.0-r1'
pip install 'docker-compose==1.13.0'

Admittedly this is on Alpine and not Ubuntu, but I imagine it would work the same. Try adding a version number to your awscli first, and if that does not work, maybe add one to python-pip as well.


#5

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.