Skip to content

Install AWS CLI v2

Uninstall AWS CLI v1

sudo yum remove -y awscli
source ~/.bash_profile

Nothing.

Install AWS CLI v2

cd
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -p).zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install -i /usr/local/aws-cli -b /usr/local/bin

sudo su
cd
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -p).zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install -i /usr/aws-cli -b /usr/bin
exit

rm -rf aws*
Enable Shell Autocomplete
echo "complete -C '/usr/local/bin/aws_completer' aws" | sudo tee -a /etc/bashrc > /dev/null
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y unzip

cd
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -p).zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install -i /usr/local/aws-cli -b /usr/local/bin

sudo su
cd
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -p).zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install -i /usr/aws-cli -b /usr/bin
rm -rf aws*
exit
Enable Shell Autocomplete
echo "complete -C '/usr/local/bin/aws_completer' aws" | sudo tee -a /etc/bash.bashrc > /dev/null

AWS Documentation