Introduction
The AWS Command Line Interface (AWS CLI) is a uniform platform for managing your AWS resources. With just one tool to download and configure, you can control and automate various AWS services from the command line using scripts.
Prerequisite
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
You will get the output: /usr/local/bin/aws
Setup locally
Run this command to quickly set and view your credentials, Region, and output format. The following example shows sample values.
aws configure
Note: Make sure to download your account credentials and input them after running this command.
This output will look like this if you successfully configure the CLI.
AWS Access Key ID [None]: ***AIO***DN**7EX****
AWS Secret Access Key [None]: w***rXU***MI/****G/**MP***Y
Default region name [None]: us-****-2
Default output format [None]: json
Source link
lol