aws cli configure code example

Example 1: aws configure profile

aws configure --profile

Example 2: mac set up aws credentials

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

#Confirm
$ which aws
#/usr/local/bin/aws 
$ aws --version
#aws-cli/2.0.0 Python/3.7.4 Darwin/18.7.0 botocore/2.0.0

# Configure
aws configure

Example 3: aws cli

$ aws ec2 describe-instances



$ aws ec2 start-instances --instance-ids i-1348636c



$ aws sns publish --topic-arn arn:aws:sns:us-east-1:546419318123:OperationsError --message "Script Failure"



$ aws sqs receive-message --queue-url https://queue.amazonaws.com/546419318123/Test