Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade AWS CLI to the latest version?

People also ask

What is the latest version of the AWS CLI?

The AWS CLI version 2 is the most recent major version of the AWS CLI and supports all of the latest features.

How do I upgrade AWS CLI in Cloud 9?

I followed the instructions here as follows: sudo yum -y update # (1) Install the latest system updates. sudo yum -y install aws-cli # (2) Install the AWS CLI. aws --version # (3) Confirm the AWS CLI was installed.

How do I download a specific version of aws command line?

In your browser, download your specific version of the AWS CLI by appending a hyphen and the version number to the filename. Use the curl command – The -o option specifies the file name that the downloaded package is written to.


From http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-with-pip

To upgrade an existing AWS CLI installation, use the --upgrade option:

pip install --upgrade awscli

On Linux and MacOS X, here are the three commands that correspond to each step:

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

This does not work:

pip install --upgrade awscli

This worked fine on Ubuntu 14.04( no need to reboot also .. You would have to first install pip3 ):

pip3 install --upgrade awscli


For Ubuntu 16.04 I used parts of the other answers and comments and just reloaded bash instead of rebooting.

I installed the aws-cli using apt so I removed that first:

sudo apt-get remove awscli

Then I could pip install (I chose to use sudo to install globally with pip2):

sudo pip install -U awscli

Since I was doing this on a server I didn't want to reboot it, but reloading bash did the trick:

source ~/.bashrc

At this point I could use the new version of aws cli

aws --version