Post

Setup user profile in AWS CLI

IMPORTANT The outputs shown here were taken from a temporary AWS account which has now been deleted

Install AWS CLI

Refer to official AWS documentation Install or update to the latest version of the AWS CLI

Obtain Access Key and Secret Access Key

  1. Go to IAM service in the AWS Management Console

  1. Select a specific user and go to the Security credentials tab

  1. Create the Access Keys

a)

b)

c)

  1. Set the credentials in the AWS CLI
1
2
3
4
5
6
$ aws configure --profile cloudUser
AWS Access Key ID [None]: AKIAUOQPBICVZ3MTVB2F
AWS Secret Access Key [None]: <OMMITED_FOR_SECURITY_REASONS>
Default region name [None]:
Default output format [None]:
$
  1. Verification
1
2
3
4
5
6
7
$ aws sts get-caller-identity --profile cloudUser
{
    "UserId": "AIDAUOQPBICVW2YZ64DKF",
    "Account": "306047959211",
    "Arn": "arn:aws:iam::306047959211:user/cloud_user"
}
$
This post is licensed under CC BY 4.0 by the author.