Regions and Zones

Regions, Availability Zones and Latency

An AWS 24 Region is a geographic area with its own copy of most services, named by a code such as us-east-1 (Northern Virginia). AWS lists 39 Regions; the 17 launched before 20 March 2019 are enabled by default, and newer ones such as Malaysia (ap-southeast-5) need an opt-in first. Each Region has at least three Availability Zones (AZs) of one or more data centers with separate power and networking. A server lives in one AZ, so spreading servers over two AZs survives an outage.

A Region holds three or more Availability Zones; distance to the Region sets latency
A Region holds three or more Availability Zones; distance to the Region sets latency

Latency is paid on every round trip, so measure it from where your users are. This loop times the TCP handshake to each Region's public API endpoint, which needs no account:

Measuring round-trip time to AWS RegionsShell
for r in ap-southeast-5 ap-southeast-1 eu-west-1 us-east-1; do
  for n in 1 2 3 4 5; do   # best of five handshakes, DNS time excluded
    curl -s -o /dev/null -w '%{time_namelookup} %{time_connect}\n' "https://ec2.$r.amazonaws.com/"
  done | awk -v r="$r" '{ms = ($2 - $1) * 1000; if (NR == 1 || ms < best) best = ms}
    END {printf "%-15s %4.0f ms\n", r, best}'
done
Output
ap-southeast-5    42 ms
ap-southeast-1    50 ms
eu-west-1        215 ms
us-east-1        276 ms

Choose the nearest Region that has the services you need; prices also differ by Region. This chapter uses us-east-1, the oldest and largest. Most resources, key pairs included, exist in one Region only, and in old accounts an AZ name such as us-east-1a can map to a different building per account; the AZ ID (use1-az1) never does.