AWS Certified Cloud Practitioner / Identity and Access Management

IAM Roles Hands On

In this section, weโ€™re going to practice using IAM Roles by creating one ourselves.

๐Ÿ“ Step 1: Navigate to Roles

Start in the IAM dashboard, then click Roles in the left sidebar.

You'll likely see a few roles already listed โ€” could be two, could be more, depending on what's been set up.

๐Ÿ’ก Thatโ€™s completely normal โ€” AWS may create some by default


โž• Step 2: Start Creating a New Role

Now, weโ€™re going to create our own role.

๐Ÿ‘‰ Reminder: A role is a way to give AWS entities permissions to perform actions

Click on Create role


๐Ÿงฉ Step 3: Choose Role Type

Youโ€™ll now see different types of roles you can create.

  • There are multiple options available

  • But for this hands-on (and for the exam), we focus on: โœ… AWS Service


โš™๏ธ Step 4: Select the Service (EC2)

Next, pick the service that'll use this role. You'll see common ones listed โ€” EC2, Lambda, and several others.

For this example: select EC2, use case EC2. Ignore the rest for now.

Click Next


๐Ÿ” Step 5: Attach Permissions (Policy)

Now that weโ€™re creating a role for EC2: ๐Ÿ‘‰ We need to assign permissions

Attach the policy: IAMReadOnlyAccess

๐Ÿ’ก This allows the EC2 instance to:

  • Read information from IAM

  • But not modify anything

Click Next


๐Ÿท๏ธ Step 6: Name the Role

Now, give your role a name.

๐Ÿ‘‰ Example: DemoRoleForEC2


๐Ÿค Step 7: Review Trusted Entity

You'll now see trusted entities โ€” this defines who's allowed to actually assume the role.

In this case, it's trusted by EC2. That's what makes this an EC2 role specifically โ€” not just any role, one EC2 is permitted to use.


โœ… Step 8: Review & Create

Before creating the role:

Verify the permissions: IAMReadOnlyAccess is attached

๐Ÿ‘‰ Then click: Create role


๐ŸŽ‰ Step 9: Role Created

Your role is now created.

  • It will appear in your roles list

  • You can click on it to verify: Permissions and Configuration


๐Ÿง When Will We Use This Role?

At this stage:

  • We have created the role

  • But we wonโ€™t use it just yet

๐Ÿ‘‰ We will use it later in the EC2 section