Skip to main content

Regions and Availability Zones

AWS Global Infrastructure​

AWS has built a global infrastructure composed of Regions and Availability Zones (AZ). Understanding this architecture is essential for designing resilient applications.

┌─────────────────────────────────────────────────────────────┐
│ AWS INFRASTRUCTURE │
├─────────────────────────────────────────────────────────────┤
│ │
│ 🌍 WORLD │
│ │ │
│ ├── 📍 Region (us-east-1) │
│ │ ├── 🏢 AZ (us-east-1a) ─── Datacenter(s) │
│ │ ├── 🏢 AZ (us-east-1b) ─── Datacenter(s) │
│ │ ├── 🏢 AZ (us-east-1c) ─── Datacenter(s) │
│ │ └── ... │
│ │ │
│ ├── 📍 Region (eu-west-1) │
│ │ ├── 🏢 AZ (eu-west-1a) │
│ │ ├── 🏢 AZ (eu-west-1b) │
│ │ └── 🏢 AZ (eu-west-1c) │
│ │ │
│ ├── 📍 Region (ca-central-1) ← Canada / Montreal │
│ │ ├── 🏢 AZ (ca-central-1a) │
│ │ ├── 🏢 AZ (ca-central-1b) │
│ │ └── 🏢 AZ (ca-central-1d) │
│ │ │
│ └── ... (30+ regions worldwide) │
│ │
└─────────────────────────────────────────────────────────────┘

What is a Region?​

An AWS Region is a geographical area that contains multiple datacenters. Each region is completely independent from the others.

Characteristics of a Region​

CharacteristicDescription
IsolationEach region is isolated from the others
DataData does not leave the region (unless you request it)
ServicesNot all services are available in all regions
PricingPrices vary by region
LatencyCloser = faster

Main AWS Regions (2024)​

┌─────────────────────────────────────────────────────────────┐
│ MAIN AWS REGIONS │
├─────────────────────────────────────────────────────────────┤
│ │
│ 🇺🇸 NORTH AMERICA │
│ ├── us-east-1 │ N. Virginia │ The oldest │
│ ├── us-east-2 │ Ohio │ │
│ ├── us-west-1 │ N. California│ │
│ ├── us-west-2 │ Oregon │ │
│ └── ca-central-1 │ Montreal │ 🇨🇦 Canada │
│ │
│ 🇪🇺 EUROPE │
│ ├── eu-west-1 │ Ireland │ Popular in Europe │
│ ├── eu-west-2 │ London │ │
│ ├── eu-west-3 │ Paris │ 🇫🇷 France │
│ ├── eu-central-1 │ Frankfurt │ 🇩🇪 Germany │
│ └── eu-north-1 │ Stockholm │ │
│ │
│ 🌏 ASIA-PACIFIC │
│ ├── ap-northeast-1│ Tokyo │ 🇯🇵 Japan │
│ ├── ap-southeast-1│ Singapore │ │
│ └── ap-south-1 │ Mumbai │ 🇮🇳 India │
│ │
└─────────────────────────────────────────────────────────────┘

How to Choose a Region?​

┌─────────────────────────────────────────────────────────────┐
│ CRITERIA FOR CHOOSING A REGION │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. 📍 PROXIMITY TO USERS │
│ └── Closer = lower latency │
│ └── Users in Canada → ca-central-1 │
│ │
│ 2. ⚖️ COMPLIANCE AND REGULATION │
│ └── GDPR → Region in Europe │
│ └── Canadian data → ca-central-1 │
│ └── HIPAA, PCI-DSS → Compliant regions │
│ │
│ 3. 💰 COST │
│ └── us-east-1 often the cheapest │
│ └── Newer regions sometimes more expensive │
│ │
│ 4. 🛠️ SERVICE AVAILABILITY │
│ └── New services first in us-east-1 │
│ └── Check if the service exists in the region │
│ │
└─────────────────────────────────────────────────────────────┘
For this course

We will mainly use us-east-1 (N. Virginia) because:

  • All services are available there
  • LocalStack emulates it by default
  • Generally the lowest prices

What is an Availability Zone (AZ)?​

An Availability Zone is one or more physical datacenters within a region, with redundant power, networking, and connectivity.

Characteristics of AZs​

┌─────────────────────────────────────────────────────────────┐
│ AVAILABILITY ZONE (AZ) │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ AZ : us-east-1a │ │
│ │ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │Datacenter│ │Datacenter│ │Datacenter│ │ │
│ │ │ 1 │ │ 2 │ │ 3 │ │ │
│ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ │
│ │ │ │ │ │ │
│ │ └──────────────┼──────────────┘ │ │
│ │ │ │ │
│ │ • Redundant power │ │
│ │ • Redundant network │ │
│ │ • Physically separate from other AZs │ │
│ │ • Connected to other AZs by high-speed fiber │ │
│ │ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ Physical isolation: │
│ • Sufficient distance to avoid disasters │
│ • Close enough for low latency (< 2ms between AZs) │
│ • Flood, earthquake, fire affects only one AZ │
│ │
└─────────────────────────────────────────────────────────────┘

Why Use Multiple AZs?​

┌─────────────────────────────────────────────────────────────┐
│ HIGH AVAILABILITY │
├─────────────────────────────────────────────────────────────┤
│ │
│ SCENARIO: Complete AZ failure │
│ │
│ WITHOUT Multi-AZ WITH Multi-AZ │
│ ────────────── ────────────── │
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ AZ-1a │ │ AZ-1a │ │
│ │ ┌────┐ │ │ ┌────┐ │ │
│ │ │ EC2│ ❌ │ │ │ EC2│ ❌ │ │
│ │ └────┘ │ │ └────┘ │ │
│ │ FAILURE! │ │ │ │
│ └──────────────┘ └──────────────┘ │
│ │
│ Application DOWN ┌──────────────┐ │
│ │ AZ-1b │ │
│ │ ┌────┐ │ │
│ │ │ EC2│ ✅ │ │
│ │ └────┘ │ │
│ │ WORKING │ │
│ └──────────────┘ │
│ │
│ Application UP! ✅ │
│ │
└─────────────────────────────────────────────────────────────┘

Latency Between AZs​

Typical latency between components:

In the same AZ : < 1 ms ████
Between AZs (same region): 1-2 ms █████████
Between regions : 50-200+ ms ████████████████████████████████

Recommendation:
• Components that communicate a lot → Same AZ
• Critical components → Multi-AZ (replication)

Naming of AZs​

Name Format​

Format: <region><letter>

Examples:
• us-east-1a = Region us-east-1, AZ "a"
• us-east-1b = Region us-east-1, AZ "b"
• ca-central-1a = Region ca-central-1, AZ "a"

Warning: Different Mapping by Account!​

┌─────────────────────────────────────────────────────────────┐
│ IMPORTANT: AZ MAPPING │
├─────────────────────────────────────────────────────────────┤
│ │
│ ⚠️ us-east-1a in account A │
│ IS NOT NECESSARILY the same datacenter as │
│ us-east-1a in account B! │
│ │
│ Account A: Account B: │
│ us-east-1a → Datacenter X us-east-1a → Datacenter Y │
│ us-east-1b → Datacenter Y us-east-1b → Datacenter X │
│ │
│ AWS intentionally mixes to balance the load │
│ │
│ To truly identify an AZ: use the AZ ID │
│ Example: use1-az1, use1-az2 (identical between accounts) │
│ │
└─────────────────────────────────────────────────────────────┘

Summary Diagram​

┌─────────────────────────────────────────────────────────────────────────┐
│ REGION: us-east-1 │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐ │
│ │ us-east-1a │ │ us-east-1b │ │ us-east-1c │ │
│ │ │ │ │ │ │ │
│ │ ┌───┐ ┌───┐ ┌───┐│ │ ┌───┐ ┌───┐ ┌───┐│ │ ┌───┐ ┌───┐ ┌───┐│ │
│ │ │DC1│ │DC2│ │DC3││ │ │DC4│ │DC5│ │DC6││ │ │DC7│ │DC8│ │DC9││ │
│ │ └───┘ └───┘ └───┘│ │ └───┘ └───┘ └───┘│ │ └───┘ └───┘ └───┘│ │
│ │ │ │ │ │ │ │
│ └─────────┬─────────┘ └─────────┬─────────┘ └─────────┬─────────┘ │
│ │ │ │ │
│ └─────────────────────┼─────────────────────┘ │
│ │ │
│ High-speed network (< 2ms) │
│ │ │
│ ┌────────┴────────┐ │
│ │ Regional Services │ │
│ │ (S3, IAM, etc.) │ │
│ └─────────────────┘ │
│ │
│ Physical distance between AZs: several kilometers │
│ Isolation: separate power, cooling, network │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Regional vs Global Services​

Global Services (not tied to a region)​

ServiceDescription
IAMIdentity management
Route 53DNS
CloudFrontCDN
WAFWeb application firewall

Regional Services (tied to a region)​

ServiceDescription
EC2Instances in a region/AZ
S3Buckets in a region
RDSRegional databases
LambdaRegional functions
VPCRegional networks

Best Practices​

1. Always Multi-AZ for Production​

❌ BAD: Everything in a single AZ
✅ GOOD: Resources spread over 2-3 AZs

2. Choose the Nearest Region​

Main users in Quebec?
→ ca-central-1 (Montreal)

Users in France?
→ eu-west-3 (Paris) or eu-west-1 (Ireland)

3. Check Service Availability​

# Before choosing a region, check if the service exists
# AWS Console → Choose region → See available services

4. Consider Costs​

EC2 t3.micro pricing (example):
us-east-1 : $0.0104/h ████
ca-central-1 : $0.0116/h █████
eu-west-3 : $0.0120/h █████
ap-south-1 : $0.0108/h ████

Difference may seem small but adds up!

Validation Quiz​

  1. What is an AWS Region?
  2. What is an Availability Zone?
  3. How many AZs are recommended at a minimum for production?
  4. What is the typical latency between two AZs in the same region?
  5. Which region should be used for Canadian users with data residency requirements?
  6. Name 2 global AWS services (not tied to a region).

Next section: AMI - Machine Images