/IAM & Access Management
Concept
Easy

IAM & Access Management

7 min read·iamusersgroupsrolespoliciesmfascporganizationsleast-privilegeidentity-centerclf-c02

AWS IAM is the global service for controlling who (authentication) and what (authorization) can access AWS resources. Core components are users, groups, roles, and JSON policies. Following least-privilege principles, enabling MFA on the root account, and using roles instead of long-term access keys for services are the most tested IAM best practices on CLF-C02.


1. IAM Overview

AWS Identity and Access Management (IAM) is a global service (not region-specific) that controls:

  • Authentication — Who you are (verifying identity via login or credentials)
  • Authorization — What you can do (permissions granted via policies)

IAM is free — no charge for creating users, roles, groups, or policies.


2. IAM Core Components

Rendering diagram…

3. Root Account

Created automatically when you first sign up for AWS. Has complete, unrestricted access to every AWS resource and billing function.

Root account should ONLY be used for:

  • Closing the AWS account
  • Changing the AWS support plan
  • Changing the payment method
  • Enabling IAM access to the Billing console
  • Restoring IAM administrator access

Root account should NEVER be used for:

  • Daily administrative tasks
  • Programmatic API or CLI calls
  • Application access

Protect root with MFA — this is one of the most commonly tested best practices on CLF-C02.


4. IAM Users

Individual identities for humans or applications needing long-term access. Two credential types:

CredentialUsed For
PasswordAWS Management Console (web UI) login
Access Key ID + Secret Access KeyProgrammatic access via CLI, SDK, or API

Best practices for users:

  • Create one IAM user per person — never share credentials
  • Never embed access keys in application source code
  • Rotate access keys regularly
  • Delete or deactivate unused users immediately

5. IAM Groups

Collections of IAM users. Attach a policy to the group — all members automatically inherit those permissions.

Rendering diagram…

Key rules:

  • You cannot nest groups (no groups inside groups)
  • A user can belong to multiple groups and inherits permissions from all
  • Groups are for organizational convenience — they are not identities and cannot log in

6. IAM Roles

A role is an identity that can be assumed by AWS services, users, or applications. Roles provide temporary security credentials via AWS STS (Security Token Service) — no long-term passwords or access keys are stored anywhere.

Rendering diagram…

Why roles instead of users for services:

  • No static access keys to rotate or accidentally expose in code
  • Credentials are automatically rotated by STS
  • Fine-grained permissions tailored to each service's needs

Common role use cases:

Who Assumes the RoleExample
EC2 instanceInstance role allowing the app to write to S3
Lambda functionExecution role allowing Lambda to read from DynamoDB
ECS taskTask role with permissions for the containerized app
Federated userCorporate employee signing in via Active Directory SSO
Cross-accountAccount A accessing resources in Account B

7. IAM Policies

JSON documents that define what actions are allowed or denied on which resources:

Rendering diagram…

Policy types:

TypeDescription
AWS ManagedPre-built by AWS (e.g., AdministratorAccess, ReadOnlyAccess, AmazonS3FullAccess)
Customer ManagedCreated and maintained by you; reusable across entities
InlineEmbedded directly in a single user, group, or role; not reusable
Resource-basedAttached to a resource like an S3 bucket policy; specifies who can access it
SCPsApplied at AWS Organizations level; define maximum permissions for entire accounts

8. Policy Evaluation: How AWS Decides Allow or Deny

When AWS receives an API request, it evaluates all applicable policies in this order:

  1. Explicit DENY in any policy — request is immediately denied (highest priority)
  2. SCP — if the account's Organization SCP does not allow the action, denied
  3. Resource-based policy — if the resource policy grants access, may be permitted
  4. Identity-based policy — the user/role must have an Allow for the action
  5. Permission boundaries — if set, the final permission cannot exceed the boundary
  6. Default: Implicit DENY — if no explicit Allow is found anywhere, the request is denied

Key rule to remember: An explicit Deny always wins over any Allow, no matter where the Allow comes from.


9. IAM Best Practices

Best PracticeWhy It Matters
Enable MFA on root accountRoot has unlimited power — one of the highest security priorities
Never use root for daily tasksReduces blast radius if root credentials are ever compromised
Grant least privilegeOnly minimum permissions needed; reduces attack surface
Use roles for EC2, Lambda, ECSNo static keys to accidentally expose in code or logs
Never share credentialsEach person and service should have its own identity
Rotate access keys regularlyLimits exposure window if a key is leaked
Use IAM Identity Center for SSOCentrally manage access across multiple accounts
Use AWS Organizations with SCPsEnforce permission guardrails across the entire organization

10. IAM Identity Center (formerly AWS SSO)

  • Centrally manage single sign-on (SSO) access to multiple AWS accounts and business apps
  • Integrates with Active Directory, Okta, and SAML 2.0 identity providers
  • Users sign in once and access multiple accounts without needing separate IAM users per account
  • Recommended approach for enterprises with multiple AWS accounts

11. AWS Organizations and SCPs

Rendering diagram…

Service Control Policies (SCPs):

  • Applied at the Organizations level to accounts or OUs
  • Define the maximum permissions available — they do not grant permissions themselves
  • An SCP Deny overrides any IAM Allow in the account
  • Used to enforce guardrails like "no one in this account can create resources outside us-east-1"

12. CLF-C02 Quick Reference

TopicKey Fact
IAM scopeGlobal service — not region-specific; free to use
Root accountFull access; protect with MFA; use only for ~5 specific tasks
IAM UsersIndividual identities; password and/or access keys; long-term
IAM GroupsCannot be nested; user can belong to multiple groups
IAM RolesTemporary credentials via STS; used by services and federated users
IAM PoliciesJSON documents; Effect, Action, Resource
Explicit DenyAlways wins over any Allow
Least privilegeGrant only minimum required permissions
MFAMust enable on root; strongly recommended for all privileged users
Access keysFor programmatic CLI/SDK access; never embed in code
SCPMax permission boundary at Organizations level; overrides IAM Allows
IAM Identity CenterSSO access to multiple AWS accounts; recommended for enterprises
Roles vs access keysAlways prefer roles for services; no static keys to manage

Practice Questions9

easy

Q1. What is the AWS root account user?


Select one answer before revealing.

easy

Q2. What is the AWS recommended best practice for securing the root account?


Select one answer before revealing.

easy

Q3. What is the principle of least privilege in AWS IAM?


Select one answer before revealing.

medium

Q4. A company has 50 developers who all need the same S3 read permissions. What is the MOST efficient IAM approach?


Select one answer before revealing.

medium

Q5. What is the key difference between an IAM user and an IAM role?


Select one answer before revealing.

medium

Q6. An application running on EC2 needs to write to an S3 bucket. What is the MOST secure way to provide this access?


Select one answer before revealing.

hard

Q7. A company uses AWS Organizations and wants to prevent all accounts in a specific OU from launching resources in the eu-west-1 region. Which feature enables this?


Select one answer before revealing.

hard

Q8. Which TWO actions can ONLY be performed by the AWS root account user and cannot be delegated to IAM users or roles? (Select TWO — more than one answer may be correct)


Select one answer before revealing.

easy

Q9. What does enabling MFA (Multi-Factor Authentication) on an AWS account add to security?


Select one answer before revealing.