How to upgrade AWS CLI to the latest version?

前端 未结 12 2372
走了就别回头了
走了就别回头了 2020-12-07 14:41

I recently noticed that I am running an old version of AWS CLI that is lacking some functionality I need:

$aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.1         


        
12条回答
  •  孤城傲影
    2020-12-07 14:46

    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
    

提交回复
热议问题