Sub topic 5
Choosing a Region: latency, compliance, services, and price
This chapter assumes you know what a Region and an Availability Zone are, and that you can run AWS CLI commands in a terminal. It covers how to pick the Region for a workload and which mistakes to avoid.
Four factors, in order
Weigh the factors in this order, because the earlier ones can rule a Region out entirely.
- Compliance and data residency. Laws, contracts, or company policy may require data to stay in a country or economic area. This is a hard limit. Remove every Region that breaks it before you compare anything else.
- Service availability. Not every service or feature exists in every Region. Newer services often launch in a few large Regions first. Check that everything you need is available.
- Latency. Choose a Region close to your users, or close to the systems your workload talks to.
- Price. The same resource can cost different amounts in different Regions. Use price to choose among the Regions that remain.
Compliance and residency
Data stays in the Region where you store it unless you copy it elsewhere or configure a service to replicate it. That makes the Region choice a direct way to meet a residency requirement. Remember that backups, logs, and replicas are also data. A cross-Region backup setting can quietly move data out of the permitted area.
Checking service availability
AWS publishes Region and service data as public Systems Manager parameters. This command lists the Regions where AWS Lambda is offered:
aws ssm get-parameters-by-path \
--path /aws/service/global-infrastructure/services/lambda/regions \
--query "Parameters[].Value" \
--output text \
--region us-east-1Run it for each service on your list and compare the results. Feature-level differences, such as a specific instance type, may need a separate check in the service documentation or in the service's own describe commands.
Measuring latency
Distance on a map is only a rough guide. You can measure the time to open a connection to a Regional endpoint from where your users are, or from a test machine in their area:
for r in eu-west-1 eu-central-1 eu-west-3; do
printf "%s " "$r"
curl -s -o /dev/null -w "%{time_connect}s\n" "https://dynamodb.$r.amazonaws.com"
doneRun it several times, because single results vary. The numbers show network distance only. They do not show how your application behaves under load.
Price
Prices for compute, storage, and data transfer vary by Region. Some Regions cost noticeably more than others for the same instance type. Use the AWS Pricing Calculator to compare the Regions that passed the earlier filters. Also note that data moving between Regions is billed as transfer. A design that keeps a database in one Region and an application in another pays for that traffic on every request.
Common errors
- Choosing the cheapest Region first. A low price does not help if the Region fails a residency rule or lacks a service.
- Defaulting to us-east-1 by habit. It has the widest service coverage, but it may be far from your users and may not meet your compliance needs.
- Splitting tightly coupled components across Regions. Latency and transfer charges add up quickly.
- Forgetting the console's Region selector. Resources you created in one Region seem to vanish when the console is set to another. Check the selector before assuming something was deleted.
- Ignoring opt-in Regions. Some Regions are disabled by default and must be enabled for your account before you can use them.
Worked example
A company has customers in Germany, and its contract requires data to stay in the EU. It needs Lambda and DynamoDB.
- Compliance leaves only the EU Regions.
- The availability check shows both services in all of them.
- Latency tests from Germany favor eu-central-1 (Frankfurt).
- A price comparison shows the cost difference is small, so Frankfurt wins on latency.
Exercise
A team picks the cheapest Region for a new application. Later they learn that customer data must stay in Canada, and the Region they chose is in the United States. Which factor should they have applied first, and why?
Show answer
Compliance and data residency. It is a hard limit that removes Regions from consideration, while latency and price only rank the Regions that remain.