AWS has data centres all over the world, grouped into regions. Each region has a name and a place:
| Region | Where |
|---|---|
us-east-1 | Northern Virginia, USA |
eu-west-1 | Ireland |
ap-southeast-2 | Sydney, Australia |
Inside a region are availability zones: separate data centres with their own power and network, a few kilometres apart. A zone's name is its region plus a letter.
Region us-east-1Northern Virginia
us-east-1azone
us-east-1bzone
us-east-1czone
Pick a region close to your customers. Then run your app in two zones: if one building has a problem, the other keeps the app up.
New command
aws ec2 describe-availability-zones
Lists the zones of a region. Zones belong to EC2, the server service.
Usageaws ec2 describe-availability-zones --region region --query 'AvailabilityZones[].[ZoneName,State]' --output table
Example
aws ec2 describe-availability-zones --region ap-southeast-2 --query 'AvailabilityZones[].[ZoneName,State]' --output table
| Part | What it does |
|---|---|
--region | sends this one command to another region. Without it, commands go to us-east-1. |
--query | AWS answers with many details. This keeps only the ones you name: here, each zone's name and state. |
--output table | draws the answer as a table, which is easier to read. |
All three work with every aws command.