AWS IAM is the access-control system at the heart of every AWS account. It controls who can do what to which resources, under what conditions. The vocabulary — user, group, role, policy — will look familiar from any RBAC system; the wrinkles are where AWS-specific behavior lives, and where most misconfigurations happen.
This page covers the IAM primitives, the policy evaluation algorithm step by step, and the layers above per-account IAM (AWS Organizations, Service Control Policies, permission boundaries) that constrain what an account-level admin can do.
The four primitives
IAM User
A long-lived identity for a person or external service. Has a username, optional console password, optional access keys (long-lived programmatic credentials).
Modern best practice: avoid IAM users for humans entirely — use SSO via IAM Identity Center (federated) instead. IAM users are still valid for services that can't federate; rotate their keys often or use IAM Roles Anywhere with X.509 certs.
IAM Group
A collection of users. Permissions attached to the group apply to every user in it. Not a security boundary, not an identity itself — just an administrative convenience for managing user permissions.
Limit: a user can be in up to 10 groups; an account can have 300 groups. Mostly a footnote — almost all serious permissioning has moved to roles + SSO.
IAM Role
An identity that can be assumed. No long-lived credentials — instead, a trust policy defines who can assume the role, and a permissions policy defines what they can do once assumed. STS mints temporary credentials at assumption time.
This is the workhorse of modern AWS IAM. EC2 instances use instance profile roles. Lambda functions execute as roles. Federated users assume roles. Cross-account access uses roles.
IAM Policy
A JSON document that says what is allowed or denied. Identity policies attach to users/groups/roles. Resource policies attach to resources (S3 buckets, KMS keys, Lambda functions).
Every API call is evaluated against every relevant policy. The structure: Effect (Allow/Deny), Action (which API), Resource (which thing), Condition (when this applies).
A policy, annotated
Here's a real-shaped IAM policy that grants read access to a specific S3 prefix, only when the request comes from a known VPC endpoint. The structure is the same for every policy in AWS:
Read this top-to-bottom: allow these S3 actions, on these resources, only when the request originated from this VPC endpoint. Change Allow to Deny and the same statement becomes a guard rather than a grant — and Deny wins ties, which matters for the evaluation algorithm below.
Policy evaluation — the algorithm
When you make an API call, AWS evaluates every policy that could apply: identity policies on the caller, resource policies on the target, SCPs from AWS Organizations, permission boundaries, session policies. The algorithm to decide Allow or Deny is fixed and worth memorizing:
"Effect": "Deny" for this action, the answer is Deny. End of evaluation. This is why Deny statements are the strongest tool in IAM — they cannot be overridden by an Allow elsewhere.AWS Organizations — the layer above
A single AWS account is rarely the right unit for a real organization. AWS Organizations lets you arrange many accounts into a tree (organization → organizational units → accounts), apply central policies, and consolidate billing. The structure looks like this:
Security, Sandbox, Workloads/Prod, Workloads/NonProd.iam:CreateUser across the whole org forces everyone to use SSO instead.Permission boundaries — delegation without giving away the farm
A common need: let your developers create roles for their workloads without letting them escalate by creating a role with admin privileges. The answer is permission boundaries.
A permission boundary is a policy you attach to a role (or a user) that defines the maximum permissions that role can ever have. Anyone who creates new roles under this delegation must also attach the boundary — and even if they write a permissive role policy, the effective permissions are the intersection. The boundary caps what they can grant.
A developer with this boundary can create a role with any combination of S3, DynamoDB, and CloudWatch Logs permissions, but they cannot grant iam:* or touch the org — even if they write that into a role policy, the boundary's Deny wins.
SCPs vs Boundaries vs Policies — which does what
These three things look similar but operate at different layers. Quick disambiguation:
- SCPs are account-wide guardrails set by the org. They limit what any identity in the affected accounts can do, even the root user. Cannot grant; only deny.
- Permission boundaries are per-identity caps on what a specific user or role can have. Used when delegating IAM admin work.
- Identity policies are the actual grant. They say "this user/role/group can do X on Y."
- Resource policies are the grant from the other direction. They say "anyone matching condition X can do Y on this resource."
AWS IAM is a layered system where every decision filters through Deny-wins evaluation. Memorize the algorithm in section 4: default Deny, any explicit Deny wins, SCP filters, boundary caps, identity-or-resource policy union. That single mental model explains every "why can't I do this?" you'll ever ask in AWS.
For real environments, the modern shape is: humans federate via Identity Center, services run as roles (never users), SCPs at the OU level enforce non-negotiables, permission boundaries delegate role creation safely, and policies should always be the smallest grant that gets the job done.
References
Formatted in APA 7. Alphabetized by first author's last name.
- Amazon Web Services. (n.d.-a). AWS Identity and Access Management user guide. https://docs.aws.amazon.com/IAM/latest/UserGuide/
- Amazon Web Services. (n.d.-b). AWS Organizations user guide. https://docs.aws.amazon.com/organizations/latest/userguide/
- Amazon Web Services. (n.d.-c). Policy evaluation logic. AWS IAM User Guide. https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html
- Amazon Web Services. (n.d.-d). Service control policies (SCPs). AWS Organizations User Guide. https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html
- Amazon Web Services. (n.d.-e). Permissions boundaries for IAM entities. AWS IAM User Guide. https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html