AWS IAM Administration and Security
Introduction to IAM Identity Creation
- In AWS, avoid using the root user for production and training.
- The root user cannot be restricted, deleted, or recreated.
- Best practice: Create an IAM user for regular account access, with full permissions as needed.
Steps to Set Up IAM Admin User
- Access IAM Console:
- In AWS Management Console, search for "IAM" and click to open the IAM console.
- If prompted with a new UI notification, simply close it.
- IAM Sign-In URL:
- The sign-in URL generally follows the format:
https://[AccountID].signin.aws.amazon.com/console - Create a user-friendly alias to replace the Account ID (e.g.,
general-[YourName]). - Ensure the alias is unique and contains the word "general".
Creating the IAM Admin User
- Go to Users Section:
- Click "Users" and then "Add users".
- User Details:
- Input the username, e.g.,
IAM admin(should be unique within the account).
- Access Type:
- Select “AWS Management Console access.”
- Set a custom password and choose whether to require password reset (uncheck for convenience).
- Set Permissions:
- Click "Attach existing policies directly".
- Locate and attach the
AdministratorAccesspolicy to grant full control over the account.
- Review and Create User:
- Review the settings and click to create the user.
Testing IAM User Access
- Sign-In URL:
- Copy the sign-in URL into a safe place. This will be used for future logins.
- Login Process:
- Open the sign-in URL, enter the IAM admin username and password.
- Verify being logged in as an IAM user instead of root () using the console dashboard.
Setting Up MFA for IAM Admin User
- Navigate to My Security Credentials:
- Click on the dropdown and choose "My Security Credentials".
- Assign MFA Device:
- Click on "Assign MFA Device" -> Select "Virtual MFA device".
- Scan the QR code with your authenticator app to create a new entry (don’t reuse existing).
- Enter MFA Codes:
- Input two consecutive codes from the authenticator app and click on "Assign MFA".
Testing MFA Access
- Log Out:
- Sign out of the IAM user session.
- Login Again:
- Use the sign-in URL, enter username and password followed by MFA code to log back in.
Summary of Actions Taken
- Established an IAM admin user separate from the root user for the general AWS account.
- Set up Multi-Factor Authentication (MFA) for enhanced security of the IAM admin account, creating two distinct entries in the authenticator app (one for the root and another for IAM admin).
Conclusion:
- From this point forward, utilize the IAM admin identity for activities in the AWS account, following best security practices.