Exercise 2 IAM
Exercise 2 IAM
[version_1.2]
Note
The exercises in this course will have an associated charge in your AWS account. In this exercise, you create the following
resources:
• AWS Identity and Access Management (IAM) policy, user, and role (policies, users, and roles are AWS account features,
offered at no additional charge)
In this exercise, you log in to your AWS account, delete the AWS account root user access keys, and (optionally) set up multi-factor
authentication (MFA). You then create an IAM user with administrator access (called Admin). Finally, you log in as the Admin user
and create an IAM role.
1. Visit https://aws.amazon.com/console/
3. Choose Root user and for Root user email address, enter the email address you used to create the account.
4. Choose Next.
1. At the top right, choose your account name, then choose Security credentials.
3. In the Manage MFA device window, choose Virtual MFA device and then choose Continue.
Note: To configure MFA for this exercise, you need to have a virtual MFA application installed on your device or computer.
To see a list of MFA applications, in Step 1 of the Set up virtual MFA device window, choose list of compatible
applications and scroll to Virtual MFA Applications. Before you continue to the next step, make sure you have installed
one of the listed applications on your mobile device or on your computer.
4. Choose Show QR code and scan the code with your device.
Note: If you are using a computer, choose Show secret key. In your MFA application, enter the secret key.
You should see a window with a message that you have successfully assigned a virtual MFA device.
9. Expand Access keys (access key ID and secret access key) and confirm that no access keys are listed.
Note: Your account shouldn’t have any listed access keys. If an access key exists (for your new account), delete the key:
◦ Locate the Actions column and choose Delete.
◦ In the Delete window, choose Deactivate.
◦ In the confirmation box, enter the access key ID.
◦ Choose Delete.
1. In the Services search box, enter IAM , and open the IAM console.
3. Choose Add users and in the Specify user details page, configure the following settings.
6. Under Are you providing console access to a person? choose I want to create an IAM user.
7. Under Console password select Custom password and enter in a complex password.
8. De-select Users must create a new password at next sign-in - Recommended. Choose Next.
13. You can sign in with the new IAM admin user by choosing the Console sign-in URL.
Note: The sign-in URL should look like the following: https://123456789012.signin.aws.amazon.com/console.
14. Log in to the console with the Admin user and password that you created.
1. Now that you are logged in as the Admin user, use the Services search bar to search for IAM again, and open the service by
choosing IAM.
5. Choose Next.
6. In the permissions filter box, search for amazons3full , and select AmazonS3FullAccess.
Note: We don’t recommend that you use full-access policies in a production environment. In this exercise, you use these policies
as a proof of concept to get your exercise environment up and running quickly. After you create your S3 bucket and DynamoDB
table, you can modify this IAM role so that it has more specific and restrictive permissions. You will learn more about this topic
later.
© 2022 Amazon Web Services, Inc. or its affiliates. All rights reserved. This work may not be reproduced or redistributed, in whole or in part, without
prior written permission from Amazon Web Services, Inc. Commercial copying, lending, or selling is prohibited. Corrections, feedback, or other
questions? Contact us at https://support.aws.amazon.com/#/contacts/aws-training. All trademarks are the property of their owners.