In this article we are going to cover How to Install AWS CLI on MAC OS, Install AWS CLI on MacOS using curl/wget, Install AWS CLI Version using Mac OS user Interface, Install AWS CLI version on Mac OS using command line, Install AWS CLI version on Mac OS using Homebrew and Uninstall AWS CLI Version from Mac OS.
Table of Contents
Install AWS CLI on Mac OS using curl/wget
Download the AWS CLI Version for MacOS using curl/wget
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
Extract the setup
unzip awscliv2.zip
Install aws cli in correct location
sudo ./aws/install
Install AWS CLI Version using Mac OS user Interface
Download the latest AWS CLI version for 64 bit mac OS
if you want to download specific version of AWS CLI version 2.0.30 for MacOS the use this link to download
Double click on installer, follow the instructions to install.
once done it will install in below location
/usr/local/aws-cli
To check AWS CLI version on Mac OS use below command,
aws version
Install AWS CLI version on Mac OS using command line
Download the latest AWS CLI version on MacOS using curl
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
if you want download specific version of aws cli version like 2.0.30 then use below command
curl "https://awscli.amazonaws.com/AWSCLIV2-2.0.30.pkg" -o "AWSCLIV2.pkg"
Install the aws cli version on Mac OS using below command
sudo installer -pkg AWSCLIV2.pkg -target /
Verify the AWS CLI version on Mac OS
which aws
Output:
/usr/local/bin/aws
To check AWS CLI version on Mac OS use below command,
aws --version
Output:
aws-cli/2.1.24 Python/3.7.4 Darwin/18.7.0 botocore/2.0.0
Install AWS CLI version on Mac OS using Homebrew
Install homebrew on mac os if not installed
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
OR
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install AWS CLI using homebrew
brew install awscli
Use below command to give permission to pkgconfig
chmod 755 /usr/local/lib/pkgconfig
Link the aws cli to brew
brew link awscli
Uninstall AWS CLI Version from Mac OS
First find the symlink where AWS CLI version is installed
which aws
Output:
/usr/local/bin/aws
Find the installation directory using symlink
ls -l /usr/local/bin/aws
Output:
lrwxrwxrwx 1 root root 37 Mar 6 09:24 /usr/local/bin/aws -> /usr/local/aws-cli/v2/current/bin/aws
remove the below aws cli installed directories
sudo rm /usr/local/bin/aws
sudo rm /usr/local/bin/aws_completer
remove the AWS CLI installation directory
sudo rm -rf /usr/local/aws-cli
Conclusion:
We have covered How to Install AWS CLI on MAC OS, Install AWS CLI on MacOS using curl/wget, Install AWS CLI Version using Mac OS user Interface, Install AWS CLI version on Mac OS using command line, Install AWS CLI version on Mac OS using Homebrew and Uninstall AWS CLI Version from Mac OS.
Related Articles: