Install AWS CLI tools

Sagar Kharab
1 min readAug 11, 2020

The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell. It is designed to implement functionalities to interact with resources in a way you can via browser.

There are two versions available of AWS CLI.

  1. v2.x: This version is generally available now and recommended for production use. However there are some breaking changes from v1.x. For comparing the changes and new feature visit AWS CLI 1.x vs 2.x.
  2. v1.x: This version is available for backward compatibility with AWS resources and services. I recommend to use v2.x if this is a new development.

To install aws cli on linux follow :

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

confirm the installation with

aws --version
aws-cli/2.0.23 Python/3.7.4 Linux/4.14.133-113.105.amzn2.x86_64 botocore/2.0.0

To install aws cli on macOS follow:

Note: If you have sudo permissions, you can install the AWS CLI version 2 for all users on the computer. We provide the steps in one easy to copy and paste group. See the descriptions of each line in the following steps.

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

To install for current user only check here.

Once the installation is verified, we can set the credentials and preference as below:

$ aws configure
AWS Access Key ID [None]: <access-key-id>
AWS Secret Access Key [None]: <secret-access-key>
Default region name [None]: eu-west-1
Default output format [None]: json/yaml

--

--

Sagar Kharab

Software Developer by profession. Chef by chance. Runner by choice. Sums it all.