How to choose "closest" AWS region?

Photo by NASA on Unsplash

How to choose "closest" AWS region?


4 min read

In today's digitally interconnected world, the speed and efficiency of your cloud infrastructure are crucial. Whether you're hosting a website, running applications, or managing data, the geographic location of your cloud resources can significantly impact performance. AWS, Azure and other cloud providers offer various regions to host your resources. When you design a system it is important to choose the right region for the infrastructure. But how?

A while ago I had a chat with buddies about choosing the "right" AWS region for their solution. The target users were from Azerbaijan and some people suggested that they should use the Bahrain region because it is the closest.

This is how I got the idea for this blog article.

Of course, when we say the "right" region there are many factors such as speed, price, regulations etc. In this blog, we will focus on speed only.

One crucial factor to consider is network hop distance, which directly affects latency and data transfer speeds.

Hop distance?

When it comes to selecting the right AWS region for your cloud resources, the first idea that comes to mind is to opt for the region that's physically closest to your location. It seems like a logical choice; after all, shorter physical distances should mean faster connections, right? Well, not necessarily.

What many people fail to realize is that the internet is a complex web of interconnected networks, and data doesn't always take the most direct route. Instead, it hops through a series of routers and switches, each introducing a slight delay known as latency. This is where the concept of network hop distance comes into play.

Create an illustration that explains the "hop distance" in computer networks. Illustration must include the map of geographical regions and with arrows show the distances. It can include network devices too.

Network hop distance is the number of network hops (or routers) data packets that must traverse between the source and destination. Network hop distance is a more accurate measure of network performance. Lower hop distance typically results in lower latency, faster data transfers, and an improved user experience, regardless of physical distance.

So how to choose the AWS region?

To determine the AWS region that offers the lowest network hop distance for your users, follow these steps:

1. Identify Your User Base

Start by identifying the geographic locations of your primary user base, just as you did in the scenario with friends.

2. Locate AWS Regions

AWS provides data centers, known as regions, across the globe. Each region consists of multiple Availability Zones, which are essentially separate data centers within the same geographic area. AWS regions are located in North America, South America, Europe, Asia, Australia, and the Middle East. Visit the AWS Global Infrastructure page to see a list of AWS regions and their locations.

3. Measure Network Hop Distance

You can use network diagnostic tools like traceroute or ping to find the hop distance between your users and various AWS regions, regardless of physical proximity.

Traceroute: Open your command prompt or terminal and run the traceroute command followed by the IP address or domain name of the AWS region. For example:

  •   traceroute

This will display a list of routers (hops) and their round-trip times (latency) between your location and the AWS region.

If you want to see something visual, just for consideration you can visit This web page has an interactive map of cables by most of the companies. However, I do not recommend you to rely on it as it will not be accurate.


Choosing the closest AWS region based on network hop distance is a fundamental step in optimizing the performance of your cloud-based applications and services. By identifying your user base, locating AWS regions, and measuring hop distances, you can make an informed decision that minimizes latency and provides the best possible user experience.

Remember that network conditions can change over time, so it's a good practice to periodically reevaluate your AWS region choice to ensure optimal performance for your users. With the right region selection, you can harness the full potential of AWS and deliver a seamless and responsive online experience.