AWS Identity and Access Management (IAM) enables you to securely control access to AWS services and resources for your users.With IAM, you can centrally manage users, security credentials such as access keys, and permissions that control which AWS resources users can access.
* IAM service
- Create IAM groups
- Create IAM users
- Use IAM credentials to log in as created users
login to the Amazon Web Services Console using credentials.
-
In the AWS Management Console search bar, enter IAM, and click the IAM result under Services.
-
From the IAM dashboard, click on User groups link in the sidebar menu.
-
Click on the Create Group blue button for creating a new IAM group.
-
In the User group name field, enter DevOps as the name of the group.
-
Skip down to the Attach permissions policies section, enter AmazonEC2ReadOnlyAccess into the search bar and select the resulting policy AmazonEC2ReadOnlyAccess.
-
Click Create Group.
In this step, we used the IAM Management console to create an IAM group.
-
From the Identity & Access Management console, click on Users in the sidebar menu.
-
Click Add users to begin creating a new user.
Note: You can create up to 10 users at a time with usernames that don't exceed 64 characters.
-
Enter the following values in the form:
- User name: John (Name must be case sensitive)
- Provide user access to the AWS Management Console: Checked
- Console password: Autogenerated password
- Users must create a new password at next sign-in: Unchecked
-
Click Next
-
Under User groups, select the DevOps group.
-
Click Next.
-
Review the configuration and click Create user.
-
Click Download .csv file,
-
Click Return to users list to see the newly created user.
In this step, we used the IAM Management console to create an IAM user and attach it to an IAM group.
-
Click John on the IAM User page.
-
Click Security Credentials and then navigate to the Console sign-in link listed in the tab.
-
Use the credentials in the CSV file you downloaded to log in as John.
In the Console enter:
* Username: Enter John
* Password: Enter the password from the spreadsheet you downloaded earlier
-
From the AWS Management Console, click on Services at the top of the page and type S3 into the text box. Select the S3 option.
-
Notice that due to the restrictive permissions you placed on the IAM user "John", the buttons are greyed out.
In this step, you logged in as your newly-created IAM user. You also confirmed that your restrictive IAM permissions worked and that your new user didn't have access to unnecessary AWS resources.