1. Log in to AWS Console:
- Open your browser and go to the AWS Management Console.
- Sign in with your AWS account credentials.
2. Navigate to IAM:
- In the AWS Management Console, search for “IAM” or find it under the “Security, Identity, & Compliance” section.
- Click on “IAM” to open the IAM dashboard.
3. Create IAM User:
- In the IAM dashboard, click on “Users” in the left navigation pane.
- Click on the “Create user” button.
- Enter a username and click Next
- Set permissions to the user and click Next.
- Review and click on Create.
4. Access Key and Secret Key:
- Once the user is created, you will see a success message.
- Click on the user created under IAM > Users.
- Click on Security Credentials.
- Under Security Credentials > Access Keys click on Create access key
- Depends up the requirement select one of the use case, I am selecting others for demo and click Next.
- Add Description tag and click on Create access key.
- You can see Access key created message on top the page it will show you access, you can download .csv file or you can copy Access key and Secret access key.
AWS CLI Commands:
1. Install AWS CLI:
- Make sure you have the AWS CLI installed on your machine. You can download it from the official AWS CLI page.
2. Configure AWS CLI:
- Open a terminal or command prompt.
- Run
aws configure
. - Enter your AWS access key, secret key, default region, and output format as prompted.
3. Create IAM User via AWS CLI:
aws iam create-user --user-name YourUserName
4. Create Access Key for IAM User via AWS CLI:
aws iam create-access-key --user-name YourUserName
- Note: Store the access key and secret key securely.
Conclusion:
You have now created an IAM user in the AWS Management Console and generated an access key and secret key for programmatic access using the AWS CLI. Remember to follow best practices for securing and managing your AWS credentials. If you plan to use these keys in a production environment, consider assigning the appropriate IAM policies to ensure least privilege access.