Skip to content
Dare Omotosho
ArticlesCybersecurityPractitioner

The three ideas that make AWS IAM make sense

Most engineers meet AWS Identity and Access Management the way they meet a fire extinguisher: they know it's there, they know it matters, and they hope they never have to look at it too closely. That's a mistake. IAM isn't a compliance checkbox bolted onto your account. It's the layer that decides who can touch what in your cloud, and getting it wrong is one of the fastest ways to turn a small mistake into a very public one.

The good news is that IAM rests on a small number of ideas, and once they click, the rest of the service stops feeling like a maze of policies and starts feeling like a set of dials you're turning on purpose.

Two different questions: who are you, and what are you allowed to do

Authentication and authorization get used almost interchangeably in casual conversation, but they answer two separate questions.

Authentication asks: who are you? It's the moment a system checks your identity, the way a receptionist checks your ID before waving you through a lobby. In AWS, this happens the instant you sign in with a username and password, or with multi-factor authentication layered on top. AWS isn't yet deciding what you can do. It's only confirming that you are who you say you are.

Authorization asks a different question: now that we know who you are, what are you allowed to do? Being let into the building doesn't mean every door is open to you. You might have access to the lobby and a meeting room, but not the server closet, unless someone has explicitly granted it. In AWS terms, authorization is what determines whether you can read an S3 bucket, launch an EC2 instance, or delete a database, and it applies just as much to services calling other services as it does to people.

The principle that should anchor every decision: least privilege

If IAM has a governing philosophy, it's the principle of least privilege: give a user or a service exactly the access it needs to do its job, and nothing beyond that.

Here's a concrete version of the trade-off. Suppose a colleague joins a project and needs access to your AWS account. The fast path is to hand over the root credentials and move on. The problem is that root access is unrestricted, so a single mistake, or a single compromised credential, can put your entire environment at risk. The safer path takes a few more minutes: define exactly which resources and actions that colleague needs, and grant only that. It's a small amount of extra care that shrinks the blast radius of almost anything that could go wrong later.

The building blocks: users, groups, and policies

IAM implements least privilege through three components.

IAM users represent individual people or applications that need to interact with AWS, each with their own credentials. IAM groups collect users together so that permissions can be managed once, at the group level, instead of user by user. This matters more than it sounds like it should: in any organization past a handful of people, managing permissions one user at a time becomes its own source of risk. IAM policies are the documents that actually define permissions: which resources can be touched, and at what level, from read-only to full control. Policies can attach to users, to groups, or to roles.

Why an explicit deny always wins

One rule in IAM is worth memorizing because it resolves a lot of confusion: an explicit deny always overrides an allow.

Picture two people, Dokas and Frank, both granted a policy that lets them create EC2 instances. Now a second policy is layered on top: Dokas is denied from creating anything larger than a t2.micro instance, and Frank is denied from creating EC2 instances at all. Frank's original "allow" doesn't save him. The deny wins, and he can't launch anything. Dokas can still launch instances, but only the small ones; the deny on larger sizes takes precedence over his broader allow.

This is what people mean by fine-grained access control: you can set a broad permission and then carve out specific restrictions on top of it, with total confidence that the restriction will hold.

Leave the root account alone

A natural question follows from all of this: if the root account already has full access, why not just use it for everyday work?

Because "full access" is exactly the problem. The root account is created the moment you set up AWS, and it can touch anything. Treat it like the master key to a vault, not an everyday one you carry in your pocket. Secure it with a strong password and MFA, store the credentials somewhere offline, and reserve it for initial setup or account recovery. Day-to-day work belongs to IAM users and roles built with the access they specifically need.

Temporary access done right: IAM roles

Sometimes you need to grant someone access for a limited window rather than permanently, and that's what IAM roles are for. A role is an identity you can assume to gain temporary permissions.

Say a third-party contractor needs to fix something inside one specific part of your environment. Instead of creating a permanent user for them, you create a role scoped to exactly that task, for a limited time. When the window closes, the access disappears with it. No cleanup required, no forgotten permissions sitting around six months later waiting to be found by someone who shouldn't have them.

The real work is the judgment, not the checkbox

None of this is complicated once you've seen it laid out. What makes IAM hard in practice isn't the mechanics, it's remembering to apply them under deadline pressure, when handing over broad access is faster than scoping it down. Every well-run cloud environment I've seen treats access control as a standing discipline, not a one-time setup task: revisit who has access to what, ask whether it's still needed, and keep tightening rather than loosening. That habit, more than any single setting, is what actually keeps a cloud account secure.

Discussion

  • No comments yet, be the first to add one.

Comments appear once approved. Upvotes are live.