Notes
The pieces
The building blocks are the same on every cloud, even if the names differ. A principal is who is acting: a user, a role, a service account, a workload. A policy is the set of rules, allowing or denying specific actions on specific resources. A resource is the thing acted on: a bucket, a database, a function. Every single API call is evaluated against the applicable policies before it is allowed. Once you see IAM as who may do what action on which resource, the providers all look alike underneath.
- principal: who is acting (user, role, service account, workload)
- policy: the rules, allow or deny, on which actions and resources
- resource: the thing acted on (bucket, database, function)
- every API call is checked against the policies
Roles, not keys
The most important habit is to use roles, not long-lived access keys. A static key sits around waiting to leak, which the last episode showed is a top breach cause. A role is assumed instead: the principal proves who it is and receives short-lived temporary credentials for a specific job. Workloads use their own identity to assume a role, so there is no stored key, the workload-identity idea from DevSecOps. People log in and assume roles per task. The whole point: nothing static to steal.
- a long-lived access key is a static secret that leaks
- a role is assumed: you get short-lived temporary credentials
- workloads use their identity to assume a role; no stored key
- users log in and assume roles per task
- nothing static to steal
Least privilege
Least privilege is the core principle: grant only the permissions actually needed. Start from zero and add only what a workload demonstrably needs, rather than starting broad and never trimming. Avoid wildcards like action-star and resource-star, and admin roles for routine work. Scope permissions to specific actions, resources and conditions. Use the providers' access analyzers to remove granted-but-unused permissions. And keep separate roles per job and environment, so one does not become a skeleton key.
- start from zero; add only what is needed
- avoid wildcards (Action: *, Resource: *) and admin
- scope to specific actions, resources, conditions
- use access analyzers to find unused permissions and trim them
- separate roles per job and per environment
How it evaluates
You need to know how a request is actually decided, because it is not obvious. By default everything is denied; you need an explicit allow for an action to succeed. But an explicit deny always wins and overrides any allow, which makes deny useful for hard guardrails. On top of that, org-level guardrails cap what is even possible in an account regardless of its own policies, and permission boundaries limit the maximum a role can have. This layered evaluation lets you reason about why a call was allowed or blocked.
- default: deny (implicit)
- an explicit allow is needed to permit an action
- an explicit deny always wins, overriding any allow
- guardrails (SCPs, org policies) can cap what is even possible
- permission boundaries limit a role's maximum
Across the clouds
The three big clouds model this with different names. AWS has IAM users and roles, JSON policies, and a token service for temporary credentials. Azure uses its directory identities with role-based access control, assigning roles at scopes like a subscription or resource group. Google Cloud binds roles to members on resources, with service accounts for workloads. The vocabulary differs, but the model is identical: principal, policy and resource produce an allow or deny. Learn it once and you can read any of them.
- AWS: IAM users/roles, JSON policies, STS for temp creds
- Azure: Entra ID identities, RBAC role assignments on scopes
- GCP: IAM members, roles bound on resources, service accounts
- same idea: principal + policy + resource -> allow/deny
Human and machine
One thing people miss: most cloud identities are not people. Human identities are your engineers, ideally arriving through single sign-on with MFA and assuming roles. But machine identities, the roles and service accounts that workloads and pipelines use, vastly outnumber humans in any real account. And they are often the most over-permissioned and least monitored, because nobody logs in as them to notice. A large share of cloud risk hides in machine identity, so govern it as carefully as human access.
- human: engineers, via SSO and MFA, assuming roles
- machine: workloads, service accounts, CI pipelines
- machine identities vastly outnumber humans, and are often over-permissioned and unmonitored
- govern both; machine identity is where the risk hides
Common mistakes
Mistakes, the IAM half of the last episode's breaches. Long-lived access keys instead of assumed roles. Wildcard and admin permissions handed out because they are easy. One powerful role reused across many services, so compromising anything compromises everything. Over-permissioned machine identities that nobody watches. No MFA on human users or the root account. And never reviewing permissions, so grants accumulate forever. Each is exactly what the next episode's attackers look for.
- long-lived access keys instead of roles
- wildcard and admin permissions everywhere
- one powerful role reused across everything
- over-permissioned machine identities
- no MFA on users or root
- never trimming permissions
Say it like this
In the interview: identity is the perimeter, so IAM is the core control. I use assumed roles rather than long-lived keys, so credentials are short-lived and nothing static leaks. I apply least privilege: scope to specific actions and resources, avoid wildcards and admin, and use access analyzers to remove unused permissions. I enforce MFA and protect root, and use org guardrails and permission boundaries as hard caps. And I govern machine identities as carefully, because they hide most of the risk.
- "Identity is the perimeter.
- Roles not long-lived keys, so credentials are short-lived.
- Least privilege: scope to specific actions and resources, no wildcards, trim
- unused with access analyzers.
- MFA on humans, guardrails and boundaries as caps, and I
- govern machine identity too."