Sub topic 2
Regions, Availability Zones, and AZ IDs
This chapter assumes you know what a Region and a VPC are, can run basic AWS CLI commands, and have an account with credentials configured. It covers how AWS divides its infrastructure and how that division maps to failure domains.
Regions and Availability Zones
A Region is a separate geographic area, such as us-east-1 or eu-west-1. Regions are isolated from each other. Most services keep their data and control plane within one Region.
An Availability Zone (AZ) is one or more data centers inside a Region. Each AZ has its own power, cooling, and networking. AZs in a Region are connected by low-latency private links, so you can replicate data synchronously between them. They are far enough apart that a fire, flood, or power failure in one is unlikely to affect another.
This makes the AZ your main failure domain for ordinary outages. Spreading a workload across at least two AZs lets it survive the loss of one.
Zone names versus AZ IDs
Names such as us-east-1a are labels that each account sees. AWS maps these labels to physical zones separately for each account. Your us-east-1a can be a different physical zone from another account's us-east-1a. This spreads load, so that not everyone's "a" is the same zone.
An AZ ID, such as use1-az1, always points to the same physical zone in every account. Use AZ IDs when you need to be sure two things share a zone, or deliberately do not.
List both for the current Region:
aws ec2 describe-availability-zones \
--query 'AvailabilityZones[].[ZoneName,ZoneId]' \
--output tableThe output pairs each name with its ID. Run it in two accounts and you may see the same name paired with different IDs.
Where this matters
- Cross-account placement. If two accounts must share a zone, compare AZ IDs, not names.
- Capacity requests and support cases. Quote the AZ ID so AWS staff know which physical zone you mean.
- Shared resources. Services such as AWS Resource Access Manager expose AZ IDs for shared subnets, so you can see which physical zone a shared subnet is in.
- Zonal outage reports. Health events often refer to AZ IDs.
Common mistakes
- Assuming
us-east-1ameans the same zone in all accounts. - Putting every subnet in one AZ because a template hard-codes a single zone name.
- Treating a Region as one failure domain. Some failures affect one AZ only, and some affect a whole Region. Multi-AZ designs address the first kind.
- Hard-coding zone names. Ask the API for the available zones, because new accounts may not see every zone in a Region.
Exercise
Account A and Account B each have a subnet in us-east-1a. Can you be sure both subnets are in the same physical zone? How would you check?
Show answer
No. The name-to-zone mapping is per account. Run aws ec2 describe-availability-zones in each account and compare the ZoneId values. If both show the same ID, such as use1-az1, the subnets are in the same physical zone.