SkillSprout
Chapter 3 · Lesson 1
Beginner
9 min read

IAM Users

Overview

AWS Identity and Access Management (IAM) is the global service that controls who can do what on which resources in your AWS account. An IAM user is an identity you create inside an account to represent a person or an application. It has a name, optional console password, optional access keys for the CLI/SDK, and permissions that come from attached policies.

Every account also has a special root user, the email address used to create the account. The root user has unrestricted power and cannot be limited by IAM policies, so it must be protected with MFA and used only for the few tasks that require it.

IAM is free, global (not tied to a Region) and the very first service to master: every other AWS service call is authorised by IAM. Today AWS recommends IAM Identity Center or federation for human users and roles for applications, using long-lived IAM users only when there is no alternative.

Key Concepts

  • Root user: created with the account, has complete access, cannot be restricted by IAM policies; protect with MFA and avoid daily use.
  • An IAM user is a permanent identity with long-term credentials: a password (console) and/or up to 2 access keys (CLI/SDK/API).
  • A new IAM user has no permissions by default (implicit deny) until a policy is attached.
  • Each user has a unique ARN (arn:aws:iam::123456789012:user/alice) and a user ID.
  • MFA adds a second factor: virtual authenticator app, FIDO2 security key (passkey) or hardware TOTP token; up to 8 MFA devices per user.
  • An account password policy sets length, complexity, expiry, reuse prevention and whether users can change passwords.
  • Default quota: 5,000 IAM users per account; each user can be in up to 10 groups and has 2 access keys.
  • Access keys start with AKIA (long-term); temporary STS credentials start with ASIA.
  • For workforce users prefer IAM Identity Center (SSO) so people get temporary credentials instead of long-lived keys.

Detailed Notes

Root user vs. IAM user

Root userIAM user
CreatedWhen you open the accountBy an administrator
Sign-inAccount email + passwordAccount ID/alias + user name + password
PermissionsEverything, cannot be restricted by IAM or permission boundaries (SCPs can limit member-account root users)Only what attached policies allow
QuantityOne per accountUp to 5,000
UseA handful of tasks onlyDay-to-day work (better: Identity Center / roles)

Tasks that require the root user

  • Change account settings (account name, email, root password, root access keys).
  • Close the AWS account.
  • Change or cancel the AWS Support plan.
  • Restore IAM user permissions when the last admin locked themselves out.
  • Activate IAM access to Billing data (first time).
  • Edit or delete an S3 bucket policy that denies all principals; enable MFA Delete on a bucket.
  • Register as a seller in the Reserved Instance Marketplace; some GovCloud/China sign-up steps.

In an AWS Organizations environment you can now centralise root-credential management and remove root credentials from member accounts, performing privileged root tasks through short-lived, task-scoped sessions.

Credentials of an IAM user

CredentialUsed forNotes
Console passwordAWS Management ConsoleGoverned by the account password policy
Access key ID + secretCLI, SDK, APIMax 2 per user (to allow rotation); secret shown only once
MFA deviceSecond factorUp to 8 devices; virtual, FIDO security key or hardware token
SSH public keys / Git credentialsCodeCommit (legacy)Rarely tested
Server certificatesLegacy HTTPSUse ACM instead

Password policy options

Minimum length (6–128, default 8), require uppercase / lowercase / numbers / symbols, password expiry (up to 1,095 days), prevent reuse (up to 24 previous passwords), and whether users can change their own password.

Creating a user with the CLI

bash
# Create the user and a console password that must be changed at first login
aws iam create-user --user-name alice
aws iam create-login-profile --user-name alice \
  --password 'Temp#Passw0rd!' --password-reset-required

# Programmatic access (only if truly needed)
aws iam create-access-key --user-name alice

# Put the user in a group to inherit permissions
aws iam add-user-to-group --user-name alice --group-name Developers

Rotating access keys safely

  1. Create the second access key for the user.
  2. Update applications to use the new key.
  3. Check the old key's last used timestamp:
bash
aws iam get-access-key-last-used --access-key-id AKIAIOSFODNN7EXAMPLE
  1. Make the old key inactive, test, then delete it.

Identifying who has what

  • Credential report: CSV of all users with password age, MFA status, key age and last use — generate it with aws iam generate-credential-report.
  • IAM Access Advisor: last-accessed information per service for a user/role, used to trim unused permissions.
  • IAM Access Analyzer: finds external access to resources and can generate least-privilege policies from CloudTrail activity.

Users in a modern architecture

NeedRecommended identity
Employees using console/CLIIAM Identity Center (SSO) or federation with corporate IdP -> temporary credentials
Application on EC2/ECS/LambdaIAM role (no keys)
CI/CD pipeline (GitHub Actions)OIDC federation into a role
On-premises server that cannot assume rolesIAM Roles Anywhere, or as a last resort an IAM user with rotated keys
Customers of your mobile/web appAmazon Cognito

Sign-in details

  • Users sign in at https://<account-id-or-alias>.signin.aws.amazon.com/console. You can create an account alias to make the URL friendlier.
  • The root user signs in with the email address.
  • IAM users cannot create other IAM users unless permitted and cannot change their own permissions.

Limits at a glance

ItemDefault
IAM users per account5,000
Groups per user10
Access keys per user2
MFA devices per user8
Managed policies attached per user10 (adjustable to 20)
Inline policy size per user2,048 characters (excluding whitespace)

Real World Example

Scenario — onboarding a data analyst at a logistics company.

A logistics firm hires a data analyst who needs to run Athena queries on shipment data in S3 and view dashboards in QuickSight. Historically IT created a shared "analyst" IAM user whose password and access keys were passed around, and nobody knew who ran which query.

The cloud team replaces that with an individual identity for each person. The analyst is created in the corporate directory and assigned to the "Analytics" group, which maps to a permission set in IAM Identity Center. She signs in with SSO and MFA, receives temporary credentials for the AnalyticsReadOnly role, and every Athena call is attributed to her name in CloudTrail.

For the one legacy on-premises batch job that cannot use SSO, the team creates a dedicated IAM user with a single policy limited to one S3 prefix, stores its key in Secrets Manager, and schedules a 90-day rotation. A weekly credential report check alerts on users without MFA or with keys older than 90 days, and the root user is locked in a vault with hardware MFA.

Architecture Diagram

Identities in an AWS account
Architecture
AWS Cloud
IAM user: alicepassword + MFA
IAM user: ci-botaccess key
AWS account
IAMauthN + authZ
Attached policies
S3 bucket

The root user sits above everything; day-to-day access goes through IAM users (or SSO) that must pass MFA and policy checks.

  1. 1A user signs in with a password plus MFA, or a script signs requests with an access key.
  2. 2IAM authenticates the identity and gathers all policies that apply.
  3. 3The request is authorised only if an explicit Allow exists and no Deny applies.
  4. 4On success the service (here S3) performs the action and CloudTrail records the call.

Best Practices

  • ✓Lock down the root user: strong unique password, MFA (hardware/FIDO key), no access keys, and use it only for tasks that need it.
  • ✓Create individual users (or SSO identities) for every person — never share credentials.
  • ✓Require MFA for all human users and enforce it with a policy condition (aws:MultiFactorAuthPresent).
  • ✓Avoid long-lived access keys; if unavoidable, rotate every 90 days, delete unused keys and never embed them in code or Git.
  • ✓Set an account password policy with sufficient length and reuse prevention.
  • ✓Review the credential report and Access Advisor regularly and remove unused users, passwords and keys.
  • ✓Prefer IAM Identity Center / federation for workforce access and roles for workloads.
  • ✓Grant least privilege by attaching policies to groups, not directly to users.

Common Interview Questions

Exam Tips

SAA-C03 focus

  • Root user: enable MFA, no access keys, use rarely. Tasks like closing the account or changing the support plan need root.
  • A new IAM user has no permissions (implicit deny). Permissions come from policies attached to the user or its groups.
  • IAM is global: users and policies are not Region-specific.
  • "Application on EC2 needs AWS access" -> IAM role, never access keys on the instance.
  • "Workforce SSO to multiple accounts" -> IAM Identity Center; "mobile/web app customers" -> Cognito.
  • Credential report = account-level list of all users and credential status; Access Advisor = last service access per identity.
  • Limits: 5,000 users, 10 groups per user, 2 access keys per user.
  • Access key ID prefix AKIA = long-term; ASIA = temporary credentials from STS.

Finished this lesson?

0 of 64 lessons done · 0% of the course