-
Notifications
You must be signed in to change notification settings - Fork 29
AWS Command Line Interface (CLI)
Syed Sayem edited this page Mar 29, 2019
·
1 revision
The AWS Command Line Interface (AWS CLI) is an Amazon Web Services tool that allow developers to control AWS from a terminal.
- Installing the AWS CLI
- Configuring the AWS CLI
Below are the steps to install awscli
using homebrew on your Mac:
$ brew install awscli
Check if it is working
$ aws
For general use, the aws configure command is the fastest way to set up your AWS CLI installation.
$ cd ~
$ 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
To see your credentials, copy & paste the following command into your terminal:
$ cat .aws/credentials
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
To see your AWS config, copy & paste the following command into your terminal:
$ cat .aws/config
[default]
region = us-east-1
output = json
To test ability to connect to AWS with newly created Access Key ID
and Secret Access Key
you need to use the following command:
$ aws sts get-caller-identity
You will get the output in the following format if everything is OK:
{
"Account": "123456789012",
"UserId": "AR#####:#####",
"Arn": "arn:aws:sts::123456789012:assumed-role/role-name/role-session-name"
}