install aws-cli code example

Example 1: how to uninstall aws cli

$ sudo rm -rf /usr/local/aws
$ sudo rm /usr/local/bin/aws

Example 2: aws cli install

# AWS CLI V2
# Installing on linux
# depends on glibc, groff, and less

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Example 3: install aws cli mac

curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /

Example 4: install aws cli mac

aws s3 cp s3://WholeBucket LocalFolder --recursive
aws s3 cp s3://Bucket/Folder LocalFolder --recursive

Tags:

Misc Example