⚠️ This lesson is retired and might contain outdated information.

Create an IAM user and add it as profile to your AWS credentials files using the AWS CLI

Rich Buggy
InstructorRich Buggy

Share this video with your friends

Send Tweet
Published 4 years ago
Updated 2 years ago

In this lesson I will create a AWS IAM user with administrator access to my account then add that user as a profile in my AWS credentials files so I can use the AWS CLI and AWS SAM to manage my AWS account from the command line.

Instructor: [00:00] Start by going to IAM in the AWS console. Select groups, and create new group. I'm going to name my group administrators. Click next step, then select the AdministratorAccess to give members of this group administrator access to your account. Click next, and finally create group.

[00:25] Now, go to users and click add user. I'm going to call this user Videos. I need to enable programmatic access so that it will generate an access key ID and a secret access key. Then click next.

[00:45] I'll add the user to the administrators group that I just created, and click next. I don't want to add any tags, so I'll click next. Then I'll click create user.

[00:59] I need to copy the access key ID and secret access key so that I can use them at the command line to create the profile. At the command line, I'm going to use the AWS configure command with the profile option to create a profile called Videos. The name of the profile doesn't need to match the name of the user created in IAM.

[01:21] I'll then paste the AWS access key ID and the secret access key from the AWS console. I'm not going to set a default region or an output format.

[01:33] You can check that the profile was created correctly by looking at the credentials file in the .aws folder inside your home directory.