Sub topic 1
How AWS is laid out: Regions, AZs, and the edge
Prerequisites
This chapter assumes you know the following:
- You can run commands in a terminal.
- You know what a virtual server and cloud storage are.
- You have a basic idea of what a network and an IP address are.
- You have an AWS account, or you are willing to create one. You do not need the AWS CLI for the reading, but the small example near the end uses it.
The three layers
AWS infrastructure has three layers you will meet constantly: Regions, Availability Zones, and edge locations. Each layer answers a different question.
| Layer | What it is | Question it answers |
|---|---|---|
| Region | A separate geographic area, such as `us-east-1` (N. Virginia) or `eu-west-1` (Ireland) | Which part of the world does my workload run in? |
| Availability Zone (AZ) | One or more discrete data centers inside a Region, with independent power, cooling, and networking | How do I survive a failure inside one Region? |
| Edge location | A site used by services such as Amazon CloudFront to cache content close to users | How do I deliver content quickly to people far from my Region? |
Later chapters cover each layer in detail. Here you only need the working model.
Regions
A Region is a physical area of the world that contains several AZs. Regions are isolated from each other by design. A problem in one Region does not normally affect another, and your data does not leave a Region unless you move it or configure a service to copy it. This isolation matters for compliance and for limiting the blast radius of a failure.
Each Region has a code (us-east-1) and a name (US East, N. Virginia). Code names are what you pass to the CLI and SDKs.
Availability Zones
An Availability Zone sits inside a Region. AZs in the same Region are physically separate, so a fire, flood, or power loss in one is unlikely to hit another. They are connected by fast, low-latency private links. That connection lets you run one application across several AZs and replicate data between them.
AZ names look like Region code plus a letter, for example us-east-1a. Most Regions have three or more AZs.
The edge
Edge locations are not Regions or AZs. You do not launch servers in them. Services such as CloudFront (content delivery) and Route 53 (DNS) use them to answer requests near the user. Chapter later in this tutorial covers Local Zones and Wavelength Zones, which place some compute closer to cities or mobile networks.
Seeing it from the CLI
You can ask AWS which Regions your account can use right now:
aws ec2 describe-regions --query "Regions[].RegionName" --output textThe list contains only enabled Regions. Some newer Regions are opt-in and do not appear until you enable them, which a later chapter explains.
To see the AZs in one Region:
aws ec2 describe-availability-zones --region us-east-1 \
--query "AvailabilityZones[].[ZoneName,ZoneId,State,ZoneType]" \
--output tableThe output has a ZoneName such as us-east-1a and a ZoneId such as use1-az1. These are not always the same physical zone across accounts, a point the chapter on AZ names versus IDs covers.
Common errors at this stage
- Looking for a resource in the console and not finding it. Most resources belong to one Region, so check the Region selector in the top bar first.
- Assuming a Region is a single data center. It is a group of AZs, each made up of one or more data centers.
- Assuming data is copied between Regions automatically. Cross-Region copies happen only when you configure them.
- Treating the edge as a place to run your whole application. Edge locations serve cached or routed traffic. Your main workload still runs in a Region.
Check your understanding
Exercise
A teammate says, "We run in two Availability Zones, so we are protected if the whole Region has a problem." Is that correct? Explain which layer protects against which failure.
Show answer
No. Two AZs in one Region protect against the loss of a single AZ, such as a power or cooling failure in one facility. They do not protect against a Region-wide problem, because both AZs are in the same Region. Protection against a Region-level failure needs a second Region. Edge locations do not help here, because they cache and route traffic rather than host your primary workload.