Create AWS IAM User
To use the AWS CLI, you need an IAM user with appropriate permissions.
Prerequisite: You need your own AWS account to create a new user. AWS offers free tier accounts to get you started.
It is not recommended to use your AWS root account for these activities.
Follow these steps in the AWS Console to set up a new IAM user under your account:
- Log in to the AWS Management Console
- Navigate to IAM (Identity and Access Management)
- Click on Users in the left sidebar
- Click Create user
- Enter a username (e.g., “ds2002-cli-user”)
- Create an access key for programmatic access (for AWS CLI usage). Console access is optional.
- Attach policies:
- For EC2 access, attach the
AmazonEC2FullAccess policy (or more restrictive policies as needed)
- For S3 access (used in storage exercises), attach the
AmazonS3FullAccess policy
- You can attach multiple policies to a single IAM user
- Review and create the user
- Important: Download or copy the Access Key ID and Secret Access Key — you’ll need these to configure the AWS CLI.