AWS Builder Center

IAM for Beginners: Who Can Do What in Your AWS Account

An introduction for people new to AWS

When I first opened the AWS console, IAM was the service I understood least. The names (users, groups, roles, policies) all sounded similar, and one wrong click felt like it could break something or, worse, expose my account. If that sounds familiar, this article is for you. By the end, you'll understand what IAM is, the four building blocks you need to know, and a few habits that will keep your account safe.

What is IAM?

IAM stands for Identity and Access Management. It is the AWS service that answers two questions:
  1. Who are you? (authentication)
  1. What are you allowed to do? (authorization)
A useful analogy is an office building. IAM is the security desk. It checks who you are, hands you a badge, and decides which doors that badge can open. Nobody gets into a room unless a rule says they can.
IAM is also free. You are not charged for creating users, roles, or policies.

The Root User: Handle With Care

When you create an AWS account, you start with the root user, which is the email address and password you signed up with. The root user has unlimited power over the account, including closing it.
Because of that, the best practice is to:
  • Turn on multi-factor authentication (MFA) for the root user straight away
  • Avoid using the root user for everyday work
  • Create a separate admin identity for daily tasks instead
Think of the root user as the master key you lock in a safe. You need it to exist, but you rarely take it out.

The Four Building Blocks

1. Users

An IAM user represents one person (or application) that needs access to your account. Each user has their own credentials, so you can see who did what.

2. Groups

A group is a collection of users. Instead of giving permissions to each person one at a time, you attach permissions to the group. If you have three developers, put them in a "Developers" group and manage access once.

3. Policies

A policy is a document, written in JSON, that lists what is allowed or denied. Here is a simple example that lets someone read files from one S3 bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:ListBucket"],
"Resource": [
"arn:aws:s3:::my-example-bucket",
"arn:aws:s3:::my-example-bucket/*"
]
}
]
}
You can read it almost like a sentence: Allow these actions on these resources. Policies can be attached to users, groups, or roles.

4. Roles

A role is like a temporary badge that can be picked up by whoever needs it. Unlike a user, a role has no permanent password or access keys. Instead, something "assumes" the role and receives short-lived credentials.
Roles are used when:
  • An AWS service needs to act on your behalf (for example, a Lambda function reading from S3)
  • An application running on EC2 needs to call other AWS services
  • Someone from another AWS account needs limited access
This is one of the most important ideas in AWS. Whenever possible, give services roles rather than hard-coding access keys into your code.

The Golden Rule: Least Privilege

The principle of least privilege means giving an identity only the permissions it needs to do its job, and nothing more.
It is tempting to attach the  AdministratorAccess  policy to everything because it makes errors disappear. Resist that urge. If those credentials ever leak, the damage is limited to what the identity was allowed to do. A narrow policy turns a disaster into a minor incident.
A good habit is to start with very little access and add permissions only when something genuinely needs them.

Getting Started: A Quick Checklist

Here are the steps I'd recommend for any new account:
  1. Enable MFA on the root user.
  1. Create an IAM admin user (or use IAM Identity Center) for day-to-day work, and stop using root.
  1. Enable MFA on that user too.
  1. Use groups to assign permissions rather than attaching policies to individuals.
  1. Use roles for AWS services and applications instead of long-lived access keys.
  1. Review permissions regularly. IAM shows when a permission was last used, which helps you remove what you don't need.

Common Beginner Mistakes

  • Using the root user for everything. Create a separate user early.
  • Committing access keys to GitHub. Bots scan public repositories for leaked keys within minutes. Use roles or environment variables instead.
  • Granting  *  permissions. Wildcards for actions and resources are convenient but risky.
  • Skipping MFA. It is one of the simplest and most effective protections available.

Wrapping Up

IAM can feel intimidating at first, but the core idea is simple: identities (users and roles) are given permissions (through policies), and everything else is denied by default. If you remember to protect your root user, use roles for services, and apply least privilege, you already have a stronger security foundation than many new AWS users.
A good next step is to open the IAM console, create a test user in a group, attach a read-only policy, and see what that user can and cannot do. Hands-on practice is the fastest way to make these concepts stick.
Have questions or your own IAM tips? Share them in the comments. I'd love to learn from you too.
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