How to upgrade AWS CLI to the latest version?

I recently noticed that Iโ€™m running an old version of AWS CLI that I donโ€™t need.

$aws --version aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-85-generic 

How can I upgrade to the latest version of AWS CLI (1.10.24)?

Edit:

Running the following command does not update the AWS CLI:

 $ pip install --upgrade awscli Requirement already up-to-date: awscli in /usr/local/lib/python2.7/dist-packages Cleaning up... 

Version Check:

 $ aws --version aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-85-generic 
+105
linux ubuntu amazon-s3 amazon-web-services aws-cli
May 01 '16 at 17:04
source share
9 answers

To update the AWS command line interface, simply use:

 pip install --upgrade awscli 
+6
May 08 '19 at 12:30
source share

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

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

pip install --upgrade awscli

+96
May 01 '16 at 17:07
source share

On Linux and MacOS X, here are 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 
+39
Feb 04 '17 at 21:44
source share

This does not work:

pip install --upgrade awscli

This works fine on Ubuntu 14.04 (there is no need to reboot as well. You will need to install pip3 first):

pip3 install --upgrade awscli

+20
Dec 15 '16 at 18:52
source share

Try sudo pip install --upgrade awscli and open a new shell. This worked for me (no need to reboot).

+8
Jul 31 '17 at 21:43
source share

For Ubuntu 16.04, I used parts of other answers and comments and simply reloaded bash instead of reloading.

I installed aws-cli using apt, so I uninstalled it first:

 sudo apt-get remove awscli 

Then I could install pip (I decided to use sudo for a global installation with pip2):

 sudo pip install -U awscli 

Since I was doing this on the server, I did not want to restart it, but rebooting bash did the trick:

 source ~/.bashrc 

At the moment, I could use the new version of AWS Cli

 aws --version 
+8
Jan 31 '18 at 21:59
source share

Simple use sudo pip install awscli --force-reinstall --upgrade

This will update all necessary modules.

+2
Dec 27 '18 at 3:34
source share

We can follow the commands below to install AWS CLI on UBUNTU:

sudo apt install curl

curl " https://s3.amazonaws.com/aws-cli/awscli-bundle.zip " -o "awscli -b undle.zip"

unzip awscli -b undle.zip

sudo./awscli-bundle/install -i / usr / local / aws -b / usr / local / bin / aws

rm -rf awscli -b undle.zip awscli -b undle

For testing: aws - version

For more information:

https://gurudathbn.wordpress.com/2018/03/31/installing-aws-cli-on-ubuntu/

0
Apr 04 '18 at 9:58
source share
 pip install awscli --upgrade --user 

The --upgrade option tells pip to upgrade all requirements that are already installed. The --user option tells pip to install the program in a subdirectory of your user directory to avoid changing the libraries used by your operating system.

0
01 Oct '19 at 15:24
source share



All Articles