Installing and setting up AWS CLI on macOS

The AWS Command Line Interface (AWS CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts. - AWS

Prerequisite

  • AWS account

  • IAM user with programmatic access

Installing AWS CLI

Run this command to install AWS CLI on your local machine.

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

Verification

To verify that the shell can find and run the AWS command in your $PATH, use the following commands.

which aws

/usr/local/bin/aws (output)

aws --version

Setup locally

Run this command to quickly set and view your credentials, Region, and output format. The following example shows sample values.

aws configure

AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE

AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Default region name [None]: us-east-1

Default output format [None]: json

Thanks for your time.