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
- Go to IAM service in the AWS Management Console
- Select a specific user and go to the Security credentials tab
- Create the Access Keys
a)
b)
c)
- 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]:
$
- 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.