Skip to the page

Foundations: IAM, storage, databases, monitoring · core

Regions, availability zones and IAM

AWS runs in Regions (like ap-south-1, Mumbai) made of several isolated Availability Zones, and IAM controls who can do what through JSON policies, where an explicit Deny always wins, anything not allowed is denied, and workloads should use roles with temporary credentials instead of long-lived keys.

The notes

What you must know

  • Region = a geographic area with its own services and data (ap-south-1 Mumbai, ap-south-2 Hyderabad). Availability Zone = one or more isolated data centres inside a Region; spread instances and databases across at least two AZs for high availability.
  • Data residency: data stays in the Region you choose; Indian payment companies keep payment data in India (RBI data localisation).
  • IAM identities: users (avoid for people; use federation/IAM Identity Center with temporary credentials), groups, and roles (assumed by services, CI, or federated users; temporary credentials). The root user is locked away with MFA.
  • Policy statement: Effect (Allow/Deny), Action (s3:GetObject, wildcards like s3:Get*), Resource (ARNs), optional Condition. Evaluation: explicit Deny > Allow > default (implicit) deny.
  • Least privilege: start narrow; IAM Access Analyzer can generate policies from real activity and flag public or cross-account access.
  • Workloads on EC2, ECS and Lambda get role credentials automatically through the SDK; never put access keys in code, env files or images.

The red pen

Common traps: mistake → fix

  • Mistake: One AZ is enough for production

    Fix: an AZ outage takes the app down; use at least two.

  • Mistake: An Allow in one policy beats a Deny in another

    Fix: an explicit Deny always wins.

  • Mistake: Create an IAM user with access keys for the app

    Fix: use a role; keys leak and do not expire by themselves.

Easy to hard

Questions interviewers ask, easy to hard

  1. Region vs Availability Zone?
  2. IAM user vs role? How does a Lambda or ECS task get permission to read S3?
  3. How does IAM decide between Allow and Deny?
  4. What does least privilege look like for a service that uploads invoices to one S3 bucket?

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview