AWS Builder Center

Understanding AWS IAM: A Beginner's Guide to Users, Roles, and Policies

Learn the basics of AWS Identity and Access Management (IAM), including users, groups, roles, and policies, with simple examples for beginners.

Understanding AWS IAM: A Beginner's Guide to Users, Roles, and Policies

AWS Identity and Access Management (IAM) is one of the most important services to understand when starting with AWS. IAM helps you securely control who can access AWS resources and what actions they are allowed to perform.

What is AWS IAM?

AWS IAM is a service that allows you to manage access to AWS resources. With IAM, you can control which users or applications can access services such as Amazon S3, Amazon EC2, and AWS Lambda.
IAM follows the principle of giving users only the permissions they need to perform their tasks.

IAM Users

An IAM user represents a person or application that needs access to AWS resources.
For example, if three developers are working on an AWS project, you can create separate IAM users for each developer instead of sharing one account.
Each user can have specific permissions depending on their responsibilities.

IAM Groups

An IAM group is a collection of IAM users.
Instead of assigning the same permissions individually to every user, you can create a group and attach permissions to the group.
For example, you could create a group called Developers and give it permissions required for development tasks. Users added to this group automatically receive those permissions.

IAM Roles

An IAM role is an identity that can be assumed by a user, application, or AWS service.
Roles are commonly used when an AWS service needs permission to access another AWS service.
For example, an Amazon EC2 instance may need to access files stored in an Amazon S3 bucket. Instead of storing AWS access keys inside the application, you can attach an IAM role to the EC2 instance.

IAM Policies

IAM policies are documents that define permissions.
A policy specifies which actions are allowed or denied on which AWS resources.
For example, a policy could allow a user to read objects from a specific S3 bucket without allowing the user to delete them.
A simple policy can look like this:
1
2
3
4
5
6
7
8
9
10
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example-bucket/*"
}
]
}
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