AWS IAM

Global service controlling who (identities) can do what (policies) on which AWS resources.

Verified against AWS documentation · 2026-08-27

Key facts

  1. 01Global, not regional — users, roles, and policies exist once per account and apply everywhere
  2. 02Identities: users (people), groups (bundles of users), roles (temporary credentials assumed by anyone/anything)
  3. 03Policies are JSON documents; evaluation rule: explicit deny > explicit allow > implicit deny (default)
  4. 04Roles > access keys — services (EC2, Lambda) assume roles for temporary credentials, never store keys on instances
  5. 05Root user: full unrestricted access; lock it down with MFA and never use it for daily work

Exam triggers

Phrases and scenarios that point here.

  • "Grant EC2/Lambda access to S3" → IAM role attached to the service, never access keys in code
  • "Cross-account access" → role in the target account, trust policy allowing the source account to assume it
  • "Temporary credentials" or "federated access" → roles via STS, not new IAM users
  • "Least privilege" → start from nothing, grant only required actions
  • "Enforce MFA" / "password policy" → IAM account settings, condition keys like aws:MultiFactorAuthPresent

Not this service

  • Workforce SSO across many accounts → IAM Identity Center
  • Customer-facing app sign-ups and logins → Amazon Cognito
  • Managed Microsoft AD → AWS Directory Service

Use cases

  1. 01A deploy pipeline assumes a short-lived role to push to production instead of a shared 'ci-user' with permanent keys sitting in a config file
  2. 02A reporting Lambda in the analytics account assumes a read-only role in the production account to pull billing data — cross-account without credential sharing
  3. 03New hires land in a 'developers' group and instantly inherit the team's permissions; offboarding is one group removal, not a policy audit
  4. 04An EC2 instance profile grants a web server write access to exactly one S3 bucket — a leaked server can't touch anything else
  5. 05Permissions boundary on a sandbox role lets junior engineers create resources freely but caps what any role they create can ever do

How it's charged

  1. 01Free — no charge for users, groups, roles, policies, or STS calls
  2. 02You pay only for what identities access, not for the identities themselves
  3. 03Related paid services are separate: IAM Identity Center is free, but Directory Service and Cognito (beyond free tier) are billed

Commonly confused with

References