• The Debug Diary
  • Posts
  • A Gentle Introduction To AWS Regions and Availability Zones

A Gentle Introduction To AWS Regions and Availability Zones

Decoding AWS Infrastructure: A Closer Look at Regions and Availability Zones

If you want to understand AWS, you need to understand its regions and availability zones.

Regions and availability zones (AZs) are integral components that play a part in every AWS service that you’ll use, so it’s essential to master them.

This article will provide a gentle introduction to AWS regions and availability zones, explaining why they’re useful and how they relate to actual AWS services.

So without any further ado, let’s start at the beginning.

What Is an AWS Region?

A region in AWS is essentially a cluster of data centres. Each region is a separate geographical location that AWS uses to house their infrastructure (the physical machines and servers that are running your AWS services). In fact, AWS has Regions all over the world.

But, why bother?

What Is the Point of Regions?

As each AWS region is a completely independent stack of services/infrastructure, they are isolated from the services/infrastructure of any other region.

Data between AWS regions also isn’t automatically copied or shared, unless you configure your AWS services to do so.

This setup provides you with a number of benefits:

Low Latency and Better Performance

The faster the data can move between your user and your data centre (where your data is held), the lower the latency and the better the performance.

Therefore, if your customers are spread across the globe, you might want to think about setting up your application across several regions so that data is closer to your customer.

For example, if you have a lot of customers in the UK, then it would make sense to set up your AWS services in the eu-west-2 (London) region, as your customers will experience lower latency and better performance than if their data was held in an American data centre.

Laws Governing Data Residency

Some nations or countries have tight guidelines governing the storage of data.

For instance, the GDPR of the European Union mandates that some categories of data remain within the EU.

By choosing an area that satisfies their legal and regulatory requirements, AWS Regions enable you to satisfy these obligations.

Disaster Recovery and High Availability

You can safeguard your apps and data from a single point of failure by dispersing your resources across numerous areas.

You can failover to your resources in another region if there is a significant outage or disaster in one region. For example, if the us-east-1 region fails then you can failover to the eu-west-1 region so that your customers experience minimal downtime.

Cost Reduction

The cost of AWS services varies by area. You can therefore minimise your costs by deploying apps in areas with lower costs.

So, with these factors in mind…

How Do You Choose an AWS Region?

You should choose to launch your application on an AWS region based on the following criteria:

  1. Compliance with data governance and legal requirements: data never leaves a region without your explicit permission. i.e. if your data needs to stay in France, you should use the French region.

  2. Latency / Proximity to customers: if most of your customers are in America, it would make sense to use an American region to ensure faster load times and reduced latency for customers.

  3. Available services within a region: new services and features may not be available in every region.

  4. Pricing: pricing varies from region to region — it is transparent on the service pricing page

AWS Service Scope

Names for AWS regions generally follow the pattern of us-east-1, eu-west-1, eu-west-2, etc. and they can be compared to their actual country/location on the AWS console.

For example:

Most AWS services are region-scoped. i.e. if we you the service in one region, like us-east-1, and then move to another region, like eu-west-2, you will have no access/visibility to your usage in the first region.

AWS does have some Global Services, that are shared across all regions, such as:

  • IAM

  • Route 53 (DNS Service)

  • CloudFront (Content Delivery Network)

  • WAF (Web Application Firewall)

but most services are region-scoped, such as:

  • EC2 (IaaS)

  • Elastic Beanstalk (PaaS)

  • Lambda (Function as a Service)

  • Rekognition (SaaS)

There is a region table that can be used to determine if a service is available in a particular region:

AWS Availability Zones

Within each AWS region, there are availability zones.

Usually, a region will have 3 availability zones within it. This can vary, as the minimum number of availability zones is 3 and the maximum number is 6.

For example:

An AWS Region with 3 availability zones. Source: https://www.udemy.com/course/aws-certified-solutions-architect-associate-saa-c03/

Each availability zone, like the ap-southeast-2 region above, is one or more discrete data centres (like ap-southeast-2a or ap-southeast-2b) with redundant power, networking and connectivity. Therefore, in the ap-southeast-2a availability zone, you could have 2 data centres, as shown below:

Each availability zone has 2 data centres. Source: Source: https://www.udemy.com/course/aws-certified-solutions-architect-associate-saa-c03/

Thus, availability zones are separate from each other so that they are isolated from disasters. If something happens to the ap-southeast-2a availability zone, this won’t propagate to the ap-southeast-2b zone.

Availability zones are connected with high bandwidth, ultra-low latency networking.

Source: Source: https://www.udemy.com/course/aws-certified-solutions-architect-associate-saa-c03/

Thus, all of these availability zones together form a region.

In total, Amazon has over 200 points of presence in 84 cities across 42 countries. This means that content can be delivered to end users with lower latency as there is likely to be a data centre close to where your end users are located.

Hopefully, this article has provided you with an overview of one of the core components that span across all AWS services. Mastering regions and availability zones will be vitally important as it will give you a deeper understanding of the AWS ecosystem as a whole.

Thanks for taking the time to read this, good luck and happy coding!