Regions, AZs and shared responsibility
Why you care
When your ETL job writes to S3 and the job fails, the first question an interviewer or an on-call engineer asks is: "was this a region event, an AZ event, or your own code?" If you cannot distinguish those three, you will either declare an incident that isn't one or miss one that is. Shared responsibility is equally concrete: S3 durability is AWS's job, but whether your IAM policy lets an attacker read your settlement files is yours. Interviewers ask about AZs and shared responsibility to find out whether you think about failure proactively or only after it bites you.
Explain like I'm 5
Think of AWS as a city. A Region is a city like Mumbai or Virginia. An Availability Zone is a separate physical building inside that city, with its own power, cooling and internet feeds, connected to other buildings in the same city by underground fibre. If one building floods, the others keep running. Your data lives in specific buildings; if you only use one building and it fails, you have an outage. If you spread across buildings, one failure is a dip, not a disaster. AWS owns the buildings and guarantees them up to a standard; what you put inside the buildings, and how you arrange it, is your responsibility.
Core concept
Regions are fully independent geographic deployments, each with its own control plane, endpoints and data storage. Data written in ap-south-1 (Mumbai) does not leave that region unless you explicitly replicate it. Region-level failures are rare; AZ-level failures are more common.
Availability Zones are one or more discrete data centres inside a Region. They are:
- Physically separated (kilometres apart, separate power grids).
- Interconnected by low-latency, high-bandwidth private fibre.
- Named with a letter suffix:
ap-south-1a,ap-south-1b,ap-south-1c. The letter maps to a physical AZ randomly per account, so yourap-south-1ais not the same building as your colleague'sap-south-1a.
Availability vs recoverability: availability means the system responds right now. Recoverability means you can restore data or state after a failure. S3 is 99.999999999% durable (eleven 9s) — AWS will not lose your object — but if you delete it, AWS does not undo that. Versioning is your recoverability tool. Multi-AZ RDS keeps the database available if one AZ fails; it does not protect against DROP TABLE.
Shared responsibility: AWS owns the security of the cloud (hardware, hypervisor, managed service patches, physical access). You own security in the cloud: IAM policies, bucket policies, encryption keys, OS patches on EC2, application vulnerabilities. As you move from EC2 toward managed services (RDS → Aurora Serverless → DynamoDB), AWS's share of the responsibility grows and yours shrinks on infrastructure, but your data governance and access control responsibilities never go away.
Decision rule: use at least two AZs for any stateful workload that needs to be online during an AZ failure. Use multiple Regions only when data sovereignty, latency, or business continuity across a regional disaster justifies the cost and operational complexity.
Minimal example Simulate AZ name-to-physical shuffle
import hashlib
accounts = ["111122223333", "444455556666", "777788889999"]
az_letters = ["a", "b", "c"]
physical = ["dc-alpha", "dc-beta", "dc-gamma"]
def az_to_physical(account_id: str, letter: str) -> str:
"""AWS shuffles AZ letters per account; simulate that mapping."""
index = int(hashlib.md5(f"{account_id}{letter}".encode()).hexdigest(), 16)
return physical[index % len(physical)]
for acct in accounts:
mapping = {f"ap-south-1{l}": az_to_physical(acct, l) for l in az_letters}
print(acct, mapping)111122223333 {'ap-south-1a': 'dc-gamma', 'ap-south-1b': 'dc-alpha', 'ap-south-1c': 'dc-alpha'}
444455556666 {'ap-south-1a': 'dc-alpha', 'ap-south-1b': 'dc-gamma', 'ap-south-1c': 'dc-alpha'}
777788889999 {'ap-south-1a': 'dc-gamma', 'ap-south-1b': 'dc-gamma', 'ap-south-1c': 'dc-beta'}In production Failure domain classifier for an ETL deployment
from dataclasses import dataclass
from typing import Literal
Domain = Literal["global", "regional", "az"]
@dataclass
class Resource:
name: str
service: str
domain: Domain
az: str | None = None
def classify(r: Resource) -> str:
if r.domain == "global":
return f"{r.name}: global — survives any single region failure"
if r.domain == "regional":
return f"{r.name}: regional — survives any single AZ failure in {r.service}"
return f"{r.name}: AZ-scoped ({r.az}) — fails if {r.az} fails"
resources = [
Resource("iam-role-etl", "IAM", "global"),
Resource("s3-settlements", "S3", "regional"),
Resource("rds-postgres-main", "RDS Multi-AZ", "regional"),
Resource("ec2-jenkins", "EC2", "az", "ap-south-1b"),
Resource("ebs-jenkins-vol", "EBS", "az", "ap-south-1b"),
Resource("rds-postgres-old", "RDS Single-AZ", "az", "ap-south-1a"),
]
for r in resources:
print(classify(r))
at_risk = [r for r in resources if r.domain == "az"]
print(f"\n{len(at_risk)} resource(s) are single-AZ and represent a failure risk.")iam-role-etl: global — survives any single region failure
s3-settlements: regional — survives any single AZ failure in S3
rds-postgres-main: regional — survives any single AZ failure in RDS Multi-AZ
ec2-jenkins: AZ-scoped (ap-south-1b) — fails if ap-south-1b fails
ebs-jenkins-vol: AZ-scoped (ap-south-1b) — fails if ap-south-1b fails
rds-postgres-old: AZ-scoped (ap-south-1a) — fails if ap-south-1a fails
3 resource(s) are single-AZ and represent a failure risk.See it happen How an AZ failure affects a two-AZ ETL setup
- Normal state: primary in ap-south-1a, standby in ap-south-1b. S3 spans both AZs internally.
- ap-south-1a fails. RDS Multi-AZ detects the failure and begins automatic failover.
- Failover completes (typically 60-120 s). The standby in ap-south-1b is promoted to primary. S3 is unaffected.
- A single-AZ RDS in ap-south-1a would be offline for the entire duration. No automatic recovery.
In your world
The situation
Your Jenkins job runs on a single EC2 instance in ap-south-1b. It reads CSVs from S3 and loads into an RDS PostgreSQL instance that was created without Multi-AZ (the default in many free-tier tutorials). The whole setup has been stable for a year.
What actually breaks
One Tuesday afternoon ap-south-1b has a power event. The EC2 instance and the EBS volume become unreachable. The Jenkins job fails immediately. But worse: the RDS instance is also in ap-south-1b and goes down too. S3 is fine; your files are all there. But you have no compute to run the job and no database to load into. The on-call page fires at 02:00.
What you'd do on Monday
Move RDS to Multi-AZ (a single API call that causes a brief failover window). For Jenkins, either move to a managed service (CodeBuild, GitHub Actions) or accept the AZ risk and document it. At minimum, know your failure domains before the incident, not during it.
Imagine you work at Netflix
The numbers
Illustrative. 200M concurrent sessions × ~10 KB state per session ≈ 2 TB of session state. Netflix operates across multiple AWS Regions (us-east-1, eu-west-1, ap-southeast-1 and others). A single region carrying 33% of global traffic that has an outage affects ~66M sessions.
What the Scenario-A answer does here
The Scenario A fix (Multi-AZ RDS) still prevents AZ-level outages. What it does not prevent: a regional control-plane event. In 2012, an AWS us-east-1 event took down Netflix's US service; at that scale, even a 30-minute regional outage is a nine-figure revenue event.
What flips at this scale
At Netflix's scale the flip is active-active multi-region: every region can serve all traffic and has a full replica of the data it needs. Chaos Engineering (Chaos Monkey, Chaos Kong) validates that AZ and region failures are tolerable before they happen in production, not after.
The trade-off you'd defend
I would defend Multi-AZ RDS plus a documented recovery procedure for the Jenkins host over multi-region replication for a small ETL team, trading some regional risk for dramatically lower operational complexity and cost. Multi-region is only justified when the cost of a regional outage exceeds the cost of the added engineering.
Illustrative numbers; not Netflix-published. The 2012 AWS outage and Netflix's Chaos Engineering programme are publicly documented.
Gotchas
Your ap-south-1a is not your colleague's ap-south-1a
Two engineers both say "I deployed to ap-south-1a" but their resources end up in different physical data centres, which breaks AZ-affinity assumptions.
AWS maps AZ letters to physical data centres per account to distribute load. The letters are not consistent across accounts.
Use canonical AZ IDs (e.g. aps1-az1) from the EC2 describe-availability-zones API when you need a physical guarantee, not the letter suffixes.
Deleting an S3 object is not a failure you recover from automatically
After an accidental s3.delete_object, the eleven-9s durability guarantee does not help. The object is gone.
S3 durability protects against hardware loss, not logical deletion. Versioning is off by default.
Enable versioning on every bucket that holds data you cannot regenerate. Add a lifecycle rule to expire old versions after N days to control cost.
Shared responsibility means the managed service patch is AWS's job, but your schema migration is yours
You upgrade RDS engine version and the application breaks because a default behaviour changed.
AWS patches the engine binary; the impact on your queries, connection strings and behaviour is your responsibility to test.
Test engine upgrades in a non-production environment first. Read the AWS engine changelog, not just the upstream PostgreSQL release notes.
Tricky questions
Yes — it keeps a standby copy so you never lose data.
Multi-AZ protects availability, not against logical data loss. If you run DELETE FROM orders in the primary, the standby replicates that deletion synchronously. Point-in-time recovery from automated backups is what protects against logical data loss.
Yes, eleven 9s means it is always available.
Durability (eleven 9s) means AWS will not lose the bits. Availability is different: S3 Standard is designed for 99.99% availability, but the published SLA commitment is 99.9% monthly uptime — the number AWS actually credits you against. They are separate guarantees with separate figures.
Scenario question
You're handed a Python ETL system that has run fine for two years. The architecture review asks you to identify the failure domains. You find: one EC2 in ap-south-1a, one RDS PostgreSQL in ap-south-1a (no Multi-AZ), and data landing in S3. What do you report and what do you recommend?
Model answer
I'd report that there are two single-AZ resources that share the same AZ: the EC2 host and the RDS instance. Any ap-south-1a failure takes both down simultaneously, and because they are coupled, a failover on one without the other gives you nothing. S3 is fine; it's regional. I'd recommend enabling Multi-AZ on RDS first because that's one checkbox with no code change and a brief failover window. For EC2, I'd evaluate whether moving the Jenkins trigger to a managed service (CodeBuild, GitHub Actions) is worth the one-off migration cost. The trade-off is that Multi-AZ RDS roughly doubles the RDS cost, but for a job that feeds a production Postgres, that's justified. I'd document the EC2 AZ risk explicitly in the runbook if the team decides not to migrate it.
Interview corner
CommonWhat is an Availability Zone?
TrickMy colleague says they're in ap-south-1a and I'm in ap-south-1a. Are we in the same building?
ap-south-1a maps to a different physical data centre depending on whose account you're in. If you need a physical guarantee, compare canonical AZ IDs, not the letter suffixes.”Experience checkWhat's the difference between availability and durability in S3?
DesignWhen would you choose multi-region over multi-AZ?
Memory hook
Regions are cities. AZs are separate buildings in the same city. S3 spans buildings; your EC2 and single-AZ RDS do not.
Know which of your resources are AZ-scoped before the outage, not during it.
Self-check
Why do two AWS accounts see different physical data centres behind the same AZ letter?
AWS shuffles the mapping of letter names to physical AZs per account to spread load across data centres.
What does S3's eleven-9s durability guarantee protect against?
Hardware failure and bit-level data loss. It does not protect against accidental deletion or logical corruption; versioning does.
What is the difference between Multi-AZ RDS and a read replica?
Multi-AZ keeps a synchronous standby for high availability; failover is automatic. A read replica is an asynchronous copy for read scaling; it does not provide automatic failover.
Run the production classifier snippet above (copy-paste as-is). Then add two resources to the list: an ElastiCache cluster in ap-south-1c (AZ-scoped) and an ECS Fargate service (regional). Confirm the output classifies them correctly and that the count of single-AZ resources increases by one. Paste the new last two output lines and the updated count line.