Create an admin IAM user
Hub › AWS › Beginner › Create an admin IAM user
Goal
After this page you will have an IAM user named cli-admin with AdministratorAccess attached and a pair of access keys saved locally.
Prerequisites
- IAM in plain language
- Signed in to the AWS console as the root user.
Open IAM
In the console search bar, type IAM and open the IAM service. Make sure the top-right region selector is set to a region near you (for example ap-southeast-1 for Singapore). IAM itself is global, but the region you set here affects every other service in this tier.
Create the user
- Left sidebar → Users → Create user.
- User name:
cli-admin. - Leave Provide user access to the AWS Management Console unchecked. This user is for the CLI only.
- Click Next.
Attach the admin policy
- Permissions options: pick Attach policies directly.
- In the policy search box, type
AdministratorAccess. - Tick the checkbox next to the
AdministratorAccesspolicy. - Click Next, then Create user.
Create the access key
A user without credentials can't sign anything. Create an access key pair:
- From the user list, click
cli-admin. - Top tabs → Security credentials.
- Scroll to Access keys → Create access key.
- Pick Command Line Interface (CLI) as the use case. Tick the acknowledgement.
- Skip the description tag → Create access key.
- On the success screen, click Download .csv file. This file is shown once. If you lose it, you'll create a new key.
The CSV contains two strings:
Access key ID: AKIA... (20 chars, public-ish)
Secret access key: wJalrXUtnFEMI... (40 chars, secret)Keep the CSV in a password manager. The next page wires these into the AWS CLI.
Next → Configure the AWS CLI