AWS Builder Center
AWS IAM Hands-On Lab: Users, Groups & Permissions Explained

AWS IAM Hands-On Lab: Users, Groups & Permissions Explained

Learn AWS IAM through a hands-on lab with 3 users, 3 groups, and real S3 and EC2 permission tests. Understand policies, access control, and least privilege.

Series: Skill Builder Digital Classroom - AWS Cloud Technical Essentials (11 articles)

  1. 2
    AWS IAM Hands-On Lab: Users, Groups & Permissions Explained This article

AWS IAM Hands-On Lab: 3 Users, 3 Groups, and One Critical Security Lesson

How I explored AWS Identity and Access Management (IAM), configured permissions, and tested access to Amazon S3 and EC2.
Three employees join a company.
One needs to view files stored in Amazon S3.
Another needs to monitor Amazon EC2 instances.
The third needs to start and stop EC2 instances during maintenance.
All three need AWS access.
But they should never receive the same permissions.
That simple distinction is the foundation of cloud security.
Because giving everyone administrator access might make onboarding easier today, but it can create serious security risks tomorrow.
In this hands-on AWS lab, I explored how AWS Identity and Access Management (IAM) controls who can access cloud resources, what actions they can perform, and how permissions are enforced.
The most interesting part?
I didn't just review IAM policies. The lab let me test three different user identities and observe what happens when AWS allows—or blocks—specific operations.
Here's the complete walkthrough and what it teaches about managing AWS access securely.



1. What Is AWS IAM, and Why Does It Matter?

AWS Identity and Access Management (IAM) is a service that helps control authentication and authorization for AWS resources.
In simple terms, IAM answers two important questions:
  • Who are you? Authentication verifies an identity.
  • What are you allowed to do? Authorization determines which actions that identity can perform.
Consider a company running dozens of EC2 instances and storing business data in Amazon S3.
Without carefully designed permissions, employees could receive more access than their responsibilities require.
A support engineer who only needs to inspect an EC2 instance should not automatically have permission to terminate it.
This is where the principle of least privilege becomes essential.
Least privilege means providing only the permissions necessary to perform a task.
Not every possible permission.
Not administrator access by default.
Only what's needed.

Four IAM concepts worth understanding

IAM component
What it does
IAM User
Represents an identity with credentials within an AWS account
IAM Group
Organizes IAM users so they can share permissions
IAM Policy
Defines allowed or denied actions on AWS resources
IAM Role
Provides assumable permissions, generally using temporary credentials
In this lab, the primary focus was on users, groups, and policies.


Caption: AWS IAM provides centralized tools for managing identities and access permissions.



2. The Lab Environment: Three Users, Three Responsibilities

The AWS lab provided three existing IAM users:
  •  user-1 
  •  user-2 
  •  user-3 
It also provided three IAM groups with different permission levels.
IAM user
Assigned group
Intended access
user-1
S3-Support
Read-only access to Amazon S3
user-2
EC2-Support
Read-only access to Amazon EC2
user-3
EC2-Admin
View, start, and stop EC2 instances
Notice something important.
The administrator in this example does not receive unrestricted access to AWS.
The  EC2-Admin  group receives only the permissions defined by its EC2-specific policy.
A job title does not grant permissions. An IAM policy does.
The objective was to understand how permissions change when users are added to groups and then verify those permissions in the AWS Management Console.

Step 1: Explore the existing IAM users

From the AWS Management Console:
  1. Search for IAM.
  1. Open Users from the left navigation menu.
  1. Locate  user-1 ,  user-2 , and  user-3 .
  1. Select  user-1 .
  1. Review the Permissions, Groups, and Security credentials tabs.
Initially,  user-1  had no permissions assigned and did not belong to any group.
Its console password was enabled, meaning the identity had credentials for signing in.
But being able to sign in does not automatically mean having permission to access AWS services.
That distinction becomes important later.


Caption: Three predefined IAM users ready for permission configuration.


user-1's Permissions tab showing no assigned permissions.


user-1's Groups tab
Caption: A user can exist in AWS IAM without being granted permissions to AWS services.



3. Understanding IAM Policies: The Rules Behind Access

Creating users is only part of access management.
The real security controls come from IAM policies.
A policy is a permissions document that defines which actions can be performed on which resources.
In this lab, I examined three policies.

AmazonEC2ReadOnlyAccess

Navigate to:
IAM → User groups → EC2-Support → Permissions
The  EC2-Support  group had the AWS managed policy  AmazonEC2ReadOnlyAccess  attached.
This policy provides read-only capabilities for EC2-related operations, including relevant information from services such as CloudWatch, Elastic Load Balancing, and Auto Scaling.
For a support team, that distinction is valuable.
Engineers may need to inspect infrastructure without being authorized to modify it.



EC2-Support group and its attached AmazonEC2ReadOnlyAccess policy.


Caption: The EC2-Support group uses an AWS managed policy for read-only infrastructure access.

AmazonS3ReadOnlyAccess

Next, navigate to:
IAM → User groups → S3-Support → Permissions
This group had the  AmazonS3ReadOnlyAccess  policy.
The policy grants read-oriented access to Amazon S3 resources, including listing and retrieving permitted resources.
This is useful for employees who need to inspect storage without managing or deleting its contents.


S3-Support group showing AmazonS3ReadOnlyAccess.
Caption: Read-only permissions allow support personnel to inspect S3 resources without granting administrative access.

EC2-Admin-Policy

Finally, navigate to:
IAM → User groups → EC2-Admin → Permissions
Unlike the other groups,  EC2-Admin  used an inline policy named  EC2-Admin-Policy .
The policy allowed the group to:
  • Describe EC2 resources.
  • Start EC2 instances.
  • Stop EC2 instances.
  • Describe CloudWatch alarms.
The difference between managed and inline policies is worth understanding.
Managed policies are standalone permission policies that can be attached to multiple IAM identities.
Inline policies are embedded directly into a single IAM user, group, or role.
In practical environments, managed policies are generally useful for reusable permissions, while inline policies support tightly coupled, identity-specific rules.


EC2-Admin group with its inline EC2-Admin-Policy expanded. Highlighted the allowed EC2 actions.
Caption: A custom inline policy grants selected EC2 management operations.



4. The Three Elements That Make IAM Policies Work

An IAM permission policy uses structured statements to express authorization rules.
Three elements are especially important.
Effect
Determines whether the statement allows or denies access.
Common values are  Allow  and  Deny .
Action
Specifies the AWS operations covered by the policy.
Examples include:
  •  ec2:DescribeInstances 
  •  ec2:StartInstances 
  •  ec2:StopInstances 
  •  s3:ListBucket 
Resource
Defines which AWS resources the statement applies to.
A resource might be a particular S3 bucket, an EC2 instance, or  * , representing all applicable resources.
A policy can also include conditions that further restrict when permissions apply.

The rule that changes everything

AWS follows a default-deny authorization model.
If a request is not allowed by an applicable policy, it is generally denied.
An applicable explicit  Deny  also overrides an  Allow .
Other controls, including permissions boundaries and AWS Organizations policies, can further limit access.
This leads to an important security principle:
Access should be deliberately granted, not casually assumed.
Understanding that rule makes the next part of the lab much easier.



5. Assigning Users to Groups: Permissions Without Repetition

Now comes the practical business scenario.
Imagine onboarding three employees into different infrastructure support roles.
Rather than attaching a separate policy directly to every employee, IAM groups let an administrator manage shared permissions.
The lab followed three assignments.

Step 1: Add user-1 to S3-Support

Navigate to:
IAM → User groups → S3-Support
Then:
  1. Open the Users tab.
  1. Select Add users.
  1. Choose  user-1 .
  1. Select Add users again.
  1. Confirm that  user-1  appears in the group.
Once assigned,  user-1  inherits the permissions provided through the group's attached policies.




Step 2: Add user-2 to EC2-Support

Repeat the process for the  EC2-Support  group.
Select  user-2  and confirm its membership.
The user now receives the group's EC2 read-only permissions.


Step 3: Add user-3 to EC2-Admin

Open  EC2-Admin , add  user-3 , and confirm the assignment.
This identity receives the selected EC2 administration permissions defined by the inline policy.

Verify the final configuration

Return to the IAM User groups page.
Each group should show one member.
Group
Member count
S3-Support
1
EC2-Support
1
EC2-Admin
1
IAM User groups overview showing each group and its member count of 1.

Caption: Three IAM groups now contain one user each, organized by job responsibility.
The lesson is straightforward.
Manage permissions around responsibilities, not individual people.
When implemented carefully, group-based access management makes onboarding and permission maintenance more consistent.



6. Finding the IAM Sign-In URL

Creating access rules is useful.
Testing them is essential.
The next stage involved signing in separately as each IAM user.
First, navigate to the IAM Dashboard and locate the account's IAM user sign-in URL.
The conventional URL follows this format:
 https://123456789012.signin.aws.amazon.com/console 
The number is an example AWS account ID, not the actual lab account identifier.
An AWS account alias can also be used in the sign-in address.
Copy the URL from the lab environment.
Then open a private or incognito browser window.
This helps separate the IAM user session from the existing administrative console session.



IAM Dashboard section displaying the sign-in URL, or the IAM user sign-in page.
Caption: A dedicated sign-in URL allows IAM users to access their AWS account.




7. Testing user-1: S3 Access Works, EC2 Access Fails

This is where the lab moves from configuring permissions to observing their effects.
Sign in through the IAM user URL using:
Username:  user-1 
Password: The lab-provided  UserPassword  value.
After signing in, open Amazon S3.
The lab expects  user-1  to be able to view the designated bucket and its contents.
Why?
Because  user-1  belongs to the  S3-Support  group, which has the  AmazonS3ReadOnlyAccess  policy attached.


Amazon S3 console signed in as user-1, showing the permitted bucket or its contents.
Caption: User-1 can view S3 resources through the permissions inherited from S3-Support.

What happens when user-1 opens EC2?

Navigate to the EC2 console.
Choose Instances, ensuring that the console is using the Region specified by the lab.
The expected result is an authorization error:
“You are not authorized to perform this operation.”
This is not evidence that AWS is broken.
It demonstrates that the user has not received permission for the requested EC2 operation.
S3 read-only access does not automatically grant EC2 read-only access.


EC2 Instances page showing the authorization error while signed in as user-1.
Caption: IAM blocks EC2 access because user-1 has not been granted the required EC2 permissions.

Key takeaway

Successful authentication does not guarantee authorization.
A user may enter valid credentials and still be restricted from accessing particular AWS resources.
That's access control working as intended.



8. Testing user-2: Visibility Without Control

Next, sign out and sign in as  user-2  using the lab-provided credentials.
This identity belongs to  EC2-Support .
Open the EC2 console and select Instances in the correct Region.
The lab expects one running EC2 instance to appear.
Unlike  user-1 ,  user-2  can inspect the instance because the group's policy permits read-oriented EC2 operations.
But can the user stop it?

Testing the stop operation

Select the EC2 instance.
Open:
Instance state → Stop instance
Confirm the operation when prompted.
The expected result is another authorization error.
The user's permissions allow inspection, not stopping the instance.

EC2 Instances page signed in as user-2, with the instance visible.


stop-instance authorization error

Caption: User-2 can inspect the EC2 instance but cannot stop it because its permissions are read-only.
This is a good example of separating operational responsibilities.
A monitoring or support engineer may need access to instance details for troubleshooting.
That does not mean they should be able to change the state of a running workload.

Testing Amazon S3 access

The lab also asks  user-2  to open Amazon S3.
The expected result is an empty bucket listing without usable S3 management permissions.
This illustrates the absence of the required S3 authorization in the lab environment.
Importantly, an empty list is not proof that no buckets exist. Authorization restrictions can prevent resources from being displayed.

Key takeaway

Read access and operational control are different permissions.
That difference protects infrastructure from changes by identities whose work requires visibility alone.



9. Testing user-3: Authorized EC2 Operations

Finally, sign out and sign in as  user-3 .
This identity belongs to  EC2-Admin .
Open the EC2 console in the lab Region and navigate to Instances.
Select the running instance.
Then choose:
Instance state → Stop instance → Stop
Unlike the previous test, the operation is expected to succeed.
The instance should enter the  stopping  state.
Why does this work?
Because the  EC2-Admin-Policy  attached to the group permits the required EC2 operation.


EC2 Instances page while signed in as user-3, showing the instance entering the stopping state.

Caption: User-3 successfully stops the EC2 instance using permissions granted through EC2-Admin.
The important lesson is not that this user has more power.
It's that this user has the particular permissions necessary to perform the assigned task.
In a production environment, even operational permissions should be reviewed carefully and limited to the required resources where possible.



10. What the Three Permission Tests Actually Proved

The most valuable part of this lab is the comparison between the users.
Operation
user-1
user-2
user-3
View permitted S3 resources
Allowed
Not granted
Not granted
View EC2 instances
Not granted
Allowed
Allowed
Stop EC2 instances
Not granted
Not granted
Allowed
These outcomes describe the intended permissions and tests in this lab, not every possible AWS access configuration.
All three identities exist within the same AWS account.
All three can sign in using their configured credentials.
Yet their permissions are different.
That's the power of permission-based access management.
The same cloud infrastructure can support multiple business functions without giving every employee unrestricted control.
For Cloud Operations teams, this matters because a single AWS account can contain resources supporting development, testing, monitoring, and critical production workloads.
Granting unnecessary permissions increases the potential impact of human mistakes or compromised credentials.
The goal is not to make access difficult. It's to make access appropriate.



11. Five Common AWS IAM Mistakes to Avoid

The lab also highlights several mistakes that new cloud practitioners should understand.

Mistake 1: Giving everyone AdministratorAccess

Administrator access may be convenient, but it is usually unnecessary for routine support activities.
Better approach: Define the actions required for each role and grant only those permissions.

Mistake 2: Confusing authentication with authorization

A successful console login does not guarantee permission to view, modify, or delete a resource.
Better approach: Test access as the actual identity and confirm both permitted and restricted operations.

Mistake 3: Assigning permissions inconsistently

Attaching permissions individually to many identities can create unnecessary management complexity.
Better approach: Use appropriate group-based permissions for this IAM-user lab, and centralized access management for production workforce environments.

Mistake 4: Assuming every access-denied error means an explicit Deny policy exists

Access can be denied simply because the requested action lacks an applicable  Allow  statement.
It can also be blocked by an explicit deny or another applicable authorization control.
Better approach: Review the relevant policies and authorization context instead of treating all access-denied errors as identical.

Mistake 5: Testing resources in the wrong AWS Region

IAM permissions and regional resource visibility are different concerns.
IAM is a global service, but EC2 instances reside in specific Regions.
If the wrong Region is selected, an authorized user may not see the instance expected by the lab.
Better approach: Verify both the selected identity and the resource Region before troubleshooting.



12. From Lab Exercise to Real Cloud Operations

This lab uses IAM users and groups to make permission inheritance easy to understand.
That is useful for learning.
However, there is an important distinction between completing a training lab and designing a production AWS access environment.
AWS currently recommends that human users access AWS through federation and temporary credentials, commonly managed using AWS IAM Identity Center.
Long-term IAM user credentials are generally reserved for use cases that cannot be supported through federation.
A stronger production access model should consider:
  • Temporary credentials: Prefer IAM roles and federated access over long-lived user credentials.
  • Multi-factor authentication: Add stronger protection to sign-in.
  • Least privilege: Restrict permissions to required actions and resources.
  • Regular access reviews: Remove unused permissions and identities.
  • Policy validation: Use tools such as IAM Access Analyzer to help review permissions.
AWS managed policies provide a useful starting point, but their permissions may be broader than a particular production responsibility requires.
Over time, teams should refine access based on actual operational needs.
For a Cloud Operations engineer, the practical skill is knowing how to translate a business responsibility into an appropriate authorization model.
That includes understanding when to allow an action, when to restrict it, and how to validate the result.



13. What I Learned From AWS IAM Lab 1

This hands-on lab reinforced five foundational lessons.
1. IAM users and groups make permissions easier to organize.
Instead of duplicating policies, shared permissions can be associated with a group and inherited by its members.
2. IAM policies determine the actual operations an identity can perform.
A username or job title does not establish the level of access.
3. Read-only access is not administrative access.
Being able to inspect an EC2 instance does not automatically permit starting or stopping it.
4. Access-denied results are part of security validation.
A denied operation can demonstrate that a restriction is being enforced, although additional review may be needed to confirm why.
5. Security must be tested, not merely configured.
Reviewing policies is important. Testing the results with different identities makes those permissions easier to understand.
The clearest lesson from the entire exercise is this:
Good cloud security isn't about giving people access to everything. It's about giving the right people access to the right things.
And being able to verify that AWS enforces those decisions.



Final Thoughts: Small IAM Decisions, Big Security Impact

Three users.
Three groups.
Three permission levels.
One AWS environment.
At first, AWS IAM may look like an administrative service for creating identities and attaching policies.
But its role is much larger.
IAM helps define the boundaries between what an identity needs to do and what it should not be permitted to do.
In this lab, the distinction appeared through three practical scenarios:
One identity could inspect S3 resources.
Another could view EC2 instances without stopping them.
A third could perform the authorized EC2 stop operation.
That is least privilege in action.
For anyone learning AWS, DevOps, or Cloud Operations, understanding these permission boundaries is a foundational skill.
Because reliable infrastructure depends on more than knowing how to deploy resources.
It also depends on knowing who is allowed to operate them.

Further reading

Open to Cloud Ops Remote and technical writing projects.

Series: Skill Builder Digital Classroom - AWS Cloud Technical Essentials (11 articles)

  1. 2
    AWS IAM Hands-On Lab: Users, Groups & Permissions Explained This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article