<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adesanya Adedeji Stephen</title>
    <description>The latest articles on DEV Community by Adesanya Adedeji Stephen (@adedejicloud).</description>
    <link>https://dev.to/adedejicloud</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4029049%2F6c605931-f082-4c9b-b2b8-07592a2ed3ad.png</url>
      <title>DEV Community: Adesanya Adedeji Stephen</title>
      <link>https://dev.to/adedejicloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adedejicloud"/>
    <language>en</language>
    <item>
      <title>Building a Highly Available Multi-Region Web Application on AWS with Global Accelerator</title>
      <dc:creator>Adesanya Adedeji Stephen</dc:creator>
      <pubDate>Tue, 14 Jul 2026 20:14:25 +0000</pubDate>
      <link>https://dev.to/adedejicloud/building-a-highly-available-multi-region-web-application-on-aws-with-global-accelerator-5b2h</link>
      <guid>https://dev.to/adedejicloud/building-a-highly-available-multi-region-web-application-on-aws-with-global-accelerator-5b2h</guid>
      <description>&lt;p&gt;Learn how to build a fault-tolerant web application that automatically redirects users to a healthy AWS Region during regional outages using Amazon EC2, Application Load Balancer, Route 53 Health Checks, and AWS Global Accelerator.&lt;/p&gt;

&lt;p&gt;Author: Adedeji Adesanya&lt;/p&gt;

&lt;p&gt;Difficulty: Intermediate&lt;/p&gt;

&lt;p&gt;Estimated Time: 2–3 Hours&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Services Used:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon VPC&lt;/li&gt;
&lt;li&gt;Amazon EC2&lt;/li&gt;
&lt;li&gt;Application Load Balancer (ALB)&lt;/li&gt;
&lt;li&gt;Amazon Route 53 Health Checks&lt;/li&gt;
&lt;li&gt;AWS Global Accelerator&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;What You Will Build&lt;/li&gt;
&lt;li&gt;Solution Architecture&lt;/li&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;li&gt;Understanding the Architecture&lt;/li&gt;
&lt;li&gt;Project Overview&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Imagine you've built an e-commerce website hosted in the us-east-1 AWS Region.&lt;/p&gt;

&lt;p&gt;Everything works perfectly—until an unexpected regional outage occurs.&lt;/p&gt;

&lt;p&gt;Suddenly, your application becomes unreachable. Customers can't browse products, place orders, or make payments. Every minute of downtime affects user experience and can result in lost revenue.&lt;/p&gt;

&lt;p&gt;This is why modern cloud applications are designed with high availability and disaster recovery in mind.&lt;/p&gt;

&lt;p&gt;Instead of relying on a single Region, organizations deploy applications across multiple AWS Regions so that if one becomes unavailable, traffic can automatically be redirected to another healthy Region.&lt;/p&gt;

&lt;p&gt;In this tutorial, you'll build exactly that.&lt;/p&gt;

&lt;p&gt;By the end of this guide, you'll have a multi-region web application capable of automatically failing over between two AWS Regions using AWS Global Accelerator and Amazon Route 53 Health Checks.&lt;/p&gt;

&lt;p&gt;Rather than simply deploying infrastructure, you'll learn how multiple AWS services work together to create a resilient architecture suitable for production environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Will Build
&lt;/h2&gt;

&lt;p&gt;By the end of this tutorial, you'll have an architecture that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F25g312cdnoxg9tp6bakg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F25g312cdnoxg9tp6bakg.jpeg" alt=" " width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At a high level, the architecture consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two independent AWS Regions&lt;/li&gt;
&lt;li&gt;Separate networking infrastructure in each Region&lt;/li&gt;
&lt;li&gt;One EC2 instance running the application in each Region&lt;/li&gt;
&lt;li&gt;One Application Load Balancer per Region&lt;/li&gt;
&lt;li&gt;Route 53 Health Checks for continuous monitoring&lt;/li&gt;
&lt;li&gt;AWS Global Accelerator providing a single global entry point&lt;/li&gt;
&lt;li&gt;Automatic traffic failover during outages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The end result is a web application that continues serving users even when an entire AWS Region becomes unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AWS Global Accelerator?
&lt;/h2&gt;

&lt;p&gt;Many engineers assume Amazon Route 53 is the only solution for routing users globally.&lt;/p&gt;

&lt;p&gt;While Route 53 is an excellent DNS service, DNS-based failover has one important limitation: DNS caching.&lt;/p&gt;

&lt;p&gt;Because DNS records are cached by clients and Internet Service Providers, changes may not take effect immediately.&lt;/p&gt;

&lt;p&gt;AWS Global Accelerator solves this differently.&lt;/p&gt;

&lt;p&gt;Instead of relying on DNS propagation, it provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two static Anycast IP addresses&lt;/li&gt;
&lt;li&gt;Intelligent traffic routing through the AWS Global Network&lt;/li&gt;
&lt;li&gt;Faster failover&lt;/li&gt;
&lt;li&gt;Improved latency&lt;/li&gt;
&lt;li&gt;Better user experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For applications requiring high availability and low latency, Global Accelerator is often the preferred choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before beginning this project, ensure you have the following:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS Account&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Basic understanding of EC2&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Basic understanding of Amazon VPC&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Two AWS Regions enabled&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAM User with AdministratorAccess (or equivalent permissions)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhc1wrprh4u6z58xn134v.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhc1wrprh4u6z58xn134v.jpeg" alt=" " width="800" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Services Used
&lt;/h2&gt;

&lt;p&gt;Throughout this project, you'll work with several AWS services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon VPC
&lt;/h2&gt;

&lt;p&gt;Amazon VPC provides an isolated virtual network where your AWS resources will run. Each Region will have its own dedicated VPC to ensure complete isolation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon EC2
&lt;/h2&gt;

&lt;p&gt;Amazon EC2 hosts the web application in both Regions.&lt;/p&gt;

&lt;p&gt;Each EC2 instance runs the same application, allowing either Region to serve user requests independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Application Load Balancer
&lt;/h2&gt;

&lt;p&gt;The Application Load Balancer distributes incoming traffic to healthy EC2 instances.&lt;/p&gt;

&lt;p&gt;It also serves as the endpoint monitored by Route 53 Health Checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Amazon Route 53 Health Checks
&lt;/h2&gt;

&lt;p&gt;Health Checks continuously monitor the application's availability.&lt;/p&gt;

&lt;p&gt;If a Region becomes unhealthy, Route 53 reports the failure, allowing Global Accelerator to redirect traffic automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Global Accelerator
&lt;/h2&gt;

&lt;p&gt;Global Accelerator acts as the application's single global entry point.&lt;/p&gt;

&lt;p&gt;Instead of users connecting directly to a specific Region, they connect to Global Accelerator, which routes traffic to the nearest healthy endpoint.&lt;/p&gt;

&lt;p&gt;This makes regional failover seamless and transparent to users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the Network Foundation
&lt;/h2&gt;

&lt;p&gt;Before we can deploy our application, we need to build the network that will host it.&lt;/p&gt;

&lt;p&gt;In AWS, every resource lives inside a Virtual Private Cloud (VPC). Since we're building a multi-region architecture, we'll create a separate VPC in each AWS Region.&lt;/p&gt;

&lt;p&gt;This ensures that each Region operates independently, eliminating a single point of failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create the Primary VPC (us-east-1)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Switch your AWS Region to US East (N. Virginia) – us-east-1.&lt;/p&gt;

&lt;p&gt;From the AWS Management Console, navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Your VPCs&lt;br&gt;
→ Create VPC&lt;/p&gt;

&lt;p&gt;Choose VPC only and configure it as shown below.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name               primary-vpc&lt;br&gt;
IPv4 CIDR Block    10.0.0.0/16&lt;br&gt;
IPv6               None&lt;br&gt;
Tenancy            Default&lt;/p&gt;

&lt;p&gt;After entering the values, click &lt;strong&gt;Create VPC&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fughx4map9xpebbwvatmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fughx4map9xpebbwvatmy.png" alt=" " width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the VPC has been created successfully, you should see it listed in the VPC dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw3278xhd0b6ruvz2bjvd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw3278xhd0b6ruvz2bjvd.png" alt=" " width="798" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a /16 CIDR Block?
&lt;/h2&gt;

&lt;p&gt;You might be wondering why we chose 10.0.0.0/16.&lt;/p&gt;

&lt;p&gt;A /16 network provides 65,536 IP addresses, giving plenty of room for future expansion.&lt;/p&gt;

&lt;p&gt;Although our lab only uses a few EC2 instances, production environments often require additional subnets for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application servers&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;li&gt;NAT Gateways&lt;/li&gt;
&lt;li&gt;Private services&lt;/li&gt;
&lt;li&gt;Kubernetes clusters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Planning your IP address space early helps avoid costly network redesigns later.&lt;/p&gt;

&lt;p&gt;💡 Pro Tip: Always leave room for growth when designing cloud networks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create the Secondary VPC (us-west-2)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, switch your AWS Region to US West (Oregon) – us-west-2.&lt;/p&gt;

&lt;p&gt;Repeat the same process.&lt;/p&gt;

&lt;p&gt;Navigate to:&lt;br&gt;
VPC&lt;br&gt;
→ Your VPCs&lt;br&gt;
→ Create VPC&lt;/p&gt;

&lt;p&gt;Use the following configuration.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name             secondary-vpc&lt;br&gt;
IPv4 CIDR Block  10.1.0.0/16&lt;br&gt;
IPv6             None&lt;br&gt;
Tenancy      Default&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2yaedl69ryr5oxs5apr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2yaedl69ryr5oxs5apr1.png" alt=" " width="758" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that we used a different CIDR block (10.1.0.0/16) instead of 10.0.0.0/16.&lt;/p&gt;

&lt;p&gt;This is intentional.&lt;/p&gt;

&lt;p&gt;Each VPC must have a unique address range to avoid overlapping IP addresses. Using distinct CIDR blocks makes future networking tasks—such as VPC Peering or AWS Transit Gateway—much simpler.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Create Public Subnets
&lt;/h2&gt;

&lt;p&gt;With both VPCs in place, the next step is to create public subnets.&lt;/p&gt;

&lt;p&gt;A subnet divides a VPC into smaller, manageable networks.&lt;/p&gt;

&lt;p&gt;Our EC2 instances and Application Load Balancers will reside in these public subnets so they can receive traffic from the internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primary Region (us-east-1)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Subnets&lt;br&gt;
→ Create subnet&lt;/p&gt;

&lt;p&gt;Select primary-vpc and create the following subnet.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name                    primary-public-subnet&lt;br&gt;
Availability Zone   us-east-1a&lt;br&gt;
CIDR Block          10.0.1.0/24&lt;/p&gt;

&lt;p&gt;Click Create subnet&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo2y9rvcy5kqmryaaq788.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo2y9rvcy5kqmryaaq788.png" alt=" " width="777" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Secondary Region (us-west-2)
&lt;/h2&gt;

&lt;p&gt;Repeat the process in us-west-2.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name                    secondary-public-subnet&lt;br&gt;
Availability Zone   us-west-2a&lt;br&gt;
CIDR Block          10.1.1.0/24&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbdii8fj4sh6ewsvcx7iz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbdii8fj4sh6ewsvcx7iz.png" alt=" " width="757" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use a /24 Subnet?
&lt;/h2&gt;

&lt;p&gt;Each /24 subnet provides 256 IP addresses.&lt;/p&gt;

&lt;p&gt;This is more than enough for our project while leaving room for additional EC2 instances, load balancers, or other resources in the future.&lt;/p&gt;

&lt;p&gt;Separating the VPC into smaller subnets also improves network organization and scalability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Attach Internet Gateways
&lt;/h2&gt;

&lt;p&gt;By default, a VPC has no internet connectivity.&lt;/p&gt;

&lt;p&gt;To allow resources inside the VPC to communicate with the internet, we need an Internet Gateway (IGW).&lt;/p&gt;

&lt;p&gt;We'll create one for each VPC.&lt;/p&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Internet Gateways&lt;br&gt;
→ Create Internet Gateway&lt;/p&gt;

&lt;p&gt;For the primary Region:&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name    primary-igw&lt;/p&gt;

&lt;p&gt;After creating it, choose Actions → Attach to VPC, then select primary-vpc.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Repeat the same process in us-west-2.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Setting Value&lt;br&gt;
Name    secondary-igw&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;we'll configure Route Tables, launch our EC2 instances, install the web application, and prepare the environment for load balancing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying the Web Application and Configuring the Load Balancer
&lt;/h2&gt;

&lt;p&gt;At this stage, our networking foundation is complete.&lt;/p&gt;

&lt;p&gt;Each AWS Region now has its own VPC, public subnet, and Internet Gateway. The next step is to deploy the application that users will access.&lt;/p&gt;

&lt;p&gt;To keep the architecture consistent, we'll deploy an identical web application in both Regions. Each application will run on an Amazon EC2 instance and sit behind an Application Load Balancer (ALB).&lt;/p&gt;

&lt;p&gt;Using identical deployments ensures that either Region can serve traffic if the other becomes unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Create a Security Group for the Web Server
&lt;/h2&gt;

&lt;p&gt;Before launching the EC2 instances, we'll create a security group that controls inbound traffic.&lt;/p&gt;

&lt;p&gt;In the AWS Management Console, navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Security Groups&lt;br&gt;
→ Create Security Group&lt;/p&gt;

&lt;p&gt;Use the following configuration for the Primary Region (us-east-1).&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name            web-server-sg&lt;br&gt;
Description Security group for EC2 web servers&lt;br&gt;
VPC         primary-vpc&lt;/p&gt;

&lt;p&gt;Inbound Rules&lt;br&gt;
Type    Protocol    Port    Source&lt;br&gt;
HTTP    TCP 80  0.0.0.0/0&lt;br&gt;
SSH TCP 22  Your Public IP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why restrict SSH?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Allowing SSH from 0.0.0.0/0 exposes your server to the entire internet. Restricting it to your public IP significantly improves security while still allowing you to administer the instance.&lt;/p&gt;

&lt;p&gt;Repeat the same process in us-west-2, ensuring the security group is associated with secondary-vpc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0erqcucp4z6p3dxug6bj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0erqcucp4z6p3dxug6bj.png" alt=" " width="759" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Launch the EC2 Instances
&lt;/h2&gt;

&lt;p&gt;Now we'll deploy the application servers.&lt;/p&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;EC2&lt;br&gt;
→ Instances&lt;br&gt;
→ Launch Instance&lt;br&gt;
Primary Region (us-east-1)&lt;/p&gt;

&lt;p&gt;Use the following configuration.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name                    primary-web-server&lt;br&gt;
AMI                 Amazon Linux 2023&lt;br&gt;
Instance Type           t2.micro&lt;br&gt;
Key Pair            Select your existing key pair&lt;br&gt;
Network                 primary-vpc&lt;br&gt;
Subnet                  primary-public-subnet&lt;br&gt;
Auto-assign Public IP   Enabled&lt;br&gt;
Security Group          web-server-sg&lt;/p&gt;

&lt;p&gt;Repeat the same steps in us-west-2, changing only the instance name to:&lt;br&gt;
                  secondary-web-server&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsochr3wotnlc2rdlis3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsochr3wotnlc2rdlis3j.png" alt=" " width="770" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Install Apache and Deploy a Simple Web Page
&lt;/h2&gt;

&lt;p&gt;Once the EC2 instances are running, connect to each instance using SSH.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4ts1cek9d56wy66u4dml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4ts1cek9d56wy66u4dml.png" alt=" " width="800" height="765"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output should display:&lt;/p&gt;

&lt;p&gt;Active: active (running)&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: Create the Application Homepage
&lt;/h2&gt;

&lt;p&gt;Instead of using Apache's default page, we'll create a simple HTML page so it's easy to identify which Region is serving requests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zsmziejlr4zu5c0au3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zsmziejlr4zu5c0au3e.png" alt=" " width="800" height="589"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7aa7u2kv5udwjniw2xuy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7aa7u2kv5udwjniw2xuy.png" alt=" " width="764" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9: Verify the Web Servers
&lt;/h2&gt;

&lt;p&gt;Open a web browser and enter the public IP address of each EC2 instance.&lt;/p&gt;

&lt;p&gt;You should see the custom page indicating which Region is serving the request.&lt;/p&gt;

&lt;p&gt;This simple verification confirms that Apache is running correctly and the application is reachable before introducing the load balancer.&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Don't skip this step.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Verifying the application directly helps isolate problems early. If the page doesn't load now, it certainly won't work behind the load balancer later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 10: Create an Application Load Balancer
&lt;/h2&gt;

&lt;p&gt;Now we'll place each EC2 instance behind an Application Load Balancer.&lt;/p&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;EC2&lt;br&gt;
→ Load Balancers&lt;br&gt;
→ Create Load Balancer&lt;br&gt;
→ Application Load Balancer&lt;/p&gt;

&lt;p&gt;For the Primary Region, use the following configuration.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name                 primary-alb&lt;br&gt;
Scheme               Internet-facing&lt;br&gt;
IP Address Type      IPv4&lt;br&gt;
VPC              primary-vpc&lt;br&gt;
Subnets              Select the public subnet(s)&lt;/p&gt;

&lt;p&gt;Listener&lt;br&gt;
Protocol         Port&lt;br&gt;
HTTP                 80&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 11: Create a Target Group
&lt;/h2&gt;

&lt;p&gt;Before the ALB can forward traffic, it needs a target group.&lt;/p&gt;

&lt;p&gt;Configure it as follows.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Target Type    Instances&lt;br&gt;
Name               primary-target-group&lt;br&gt;
Protocol       HTTP&lt;br&gt;
Port               80&lt;br&gt;
Health Check Path   /&lt;/p&gt;

&lt;p&gt;Register the primary-web-server instance as the target.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Repeat the process in us-west-2, creating:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
secondary-alb&lt;br&gt;
secondary-target-group&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn3831pt1pnvkop9vhu79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn3831pt1pnvkop9vhu79.png" alt=" " width="753" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 12: Verify Load Balancer Health
&lt;/h2&gt;

&lt;p&gt;Once the Application Load Balancer has been created, wait a few minutes while it performs health checks against the registered EC2 instance.&lt;/p&gt;

&lt;p&gt;When everything is configured correctly, the target status should change to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Healthy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the target remains Unhealthy, check the following:&lt;/p&gt;

&lt;p&gt;Is Apache running?&lt;br&gt;
Does the security group allow inbound HTTP (port 80)?&lt;br&gt;
Is the health check path set to /?&lt;br&gt;
Is the EC2 instance registered with the correct target group?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4n1hl5fapki6fhs8rywo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4n1hl5fapki6fhs8rywo.png" alt=" " width="766" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring Amazon Route 53 Health Checks
&lt;/h2&gt;

&lt;p&gt;So far, we've built two identical application environments:&lt;/p&gt;

&lt;p&gt;A Primary Region in us-east-1&lt;br&gt;
A Secondary Region in us-west-2&lt;/p&gt;

&lt;p&gt;Both applications are running successfully behind their respective Application Load Balancers.&lt;/p&gt;

&lt;p&gt;However, our architecture still has one major limitation.&lt;/p&gt;

&lt;p&gt;If the primary application goes offline, AWS has no way of knowing that it should stop sending traffic to it.&lt;/p&gt;

&lt;p&gt;This is where Amazon Route 53 Health Checks come into play.&lt;/p&gt;

&lt;p&gt;They continuously monitor the health of your application's endpoints. If an endpoint becomes unhealthy, other AWS services—such as Global Accelerator—can use that information to automatically redirect traffic to a healthy endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Route 53 Health Checks Work
&lt;/h2&gt;

&lt;p&gt;At regular intervals, Route 53 sends requests to your application's endpoint.&lt;/p&gt;

&lt;p&gt;If the application responds successfully, the endpoint is considered healthy.&lt;/p&gt;

&lt;p&gt;If it fails to respond after a specified number of consecutive checks, Route 53 marks it as unhealthy.&lt;/p&gt;

&lt;p&gt;In our project, we'll configure a health check for each Region's Application Load Balancer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpj8gn7lyc5r8y0jmfugd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpj8gn7lyc5r8y0jmfugd.png" alt=" " width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 13: Copy the Load Balancer DNS Names
&lt;/h2&gt;

&lt;p&gt;Before creating the health checks, we need the DNS name of each Application Load Balancer.&lt;/p&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;EC2&lt;br&gt;
→ Load Balancers&lt;/p&gt;

&lt;p&gt;Select primary-alb.&lt;/p&gt;

&lt;p&gt;Copy the value under DNS name.&lt;/p&gt;

&lt;p&gt;It should look similar to:&lt;/p&gt;

&lt;p&gt;primary-alb-123456789.us-east-1.elb.amazonaws.com&lt;/p&gt;

&lt;p&gt;Repeat the process for secondary-alb.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 14: Create the Primary Health Check
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;Route 53&lt;br&gt;
→ Health Checks&lt;br&gt;
→ Create Health Check&lt;/p&gt;

&lt;p&gt;Configure it using the following settings.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name                    Primary-ALB-Health-Check&lt;br&gt;
What to monitor         Endpoint&lt;br&gt;
Specify endpoint by Domain Name&lt;br&gt;
Domain Name         Primary ALB DNS Name&lt;br&gt;
Protocol            HTTP&lt;br&gt;
Port                    80&lt;br&gt;
Path                    /&lt;br&gt;
Request Interval    30 Seconds&lt;br&gt;
Failure Threshold   3&lt;/p&gt;

&lt;p&gt;Leave all other settings at their default values.&lt;/p&gt;

&lt;p&gt;Click Create Health Check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 15: Create the Secondary Health Check
&lt;/h2&gt;

&lt;p&gt;Repeat the same process for the Application Load Balancer in us-west-2.&lt;/p&gt;

&lt;p&gt;Use the following configuration.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name                    Secondary-ALB-Health-Check&lt;br&gt;
Domain Name         Secondary ALB DNS&lt;br&gt;
Protocol            HTTP&lt;br&gt;
Port                    80&lt;br&gt;
Path                    /&lt;br&gt;
Request Interval    30 Seconds&lt;br&gt;
Failure Threshold   3&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 16: Verify the Health Checks
&lt;/h2&gt;

&lt;p&gt;Once both health checks have been created, wait a few minutes.&lt;/p&gt;

&lt;p&gt;Route 53 needs time to send its first requests and determine the health of each endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initially, the status may display:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Checking...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After a short period, both health checks should report:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Healthy&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn57kcy6v321pvykn4nhw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn57kcy6v321pvykn4nhw.png" alt=" " width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Health Check Results
&lt;/h2&gt;

&lt;p&gt;When Route 53 marks an endpoint as Healthy, it means:&lt;/p&gt;

&lt;p&gt;The endpoint is reachable.&lt;br&gt;
The application is responding successfully.&lt;br&gt;
The configured path (/) returned a successful HTTP response.&lt;/p&gt;

&lt;p&gt;If an endpoint becomes Unhealthy, Route 53 will stop considering it available.&lt;/p&gt;

&lt;p&gt;This health information becomes especially important in the next part of the tutorial, where AWS Global Accelerator uses it to decide where incoming traffic should be routed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Troubleshooting Health Checks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your health check doesn't become healthy after several minutes, don't panic. The issue is usually one of the following:&lt;/p&gt;

&lt;p&gt;Problem Solution&lt;br&gt;
&lt;strong&gt;Apache is not running&lt;/strong&gt;   Start the Apache service using sudo systemctl start httpd&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Port 80 is blocked&lt;/strong&gt;  Verify the EC2 security group allows inbound HTTP traffic&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Incorrect health check path&lt;/strong&gt; Ensure the path is /&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong DNS name&lt;/strong&gt;  Confirm you're using the ALB DNS name, not the EC2 public IP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target group is unhealthy&lt;/strong&gt;   Verify the EC2 instance is healthy behind the ALB&lt;/p&gt;

&lt;p&gt;Taking a few minutes to troubleshoot now will save time later when configuring Global Accelerator.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Accomplished
&lt;/h2&gt;

&lt;p&gt;At this point, we've successfully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created health checks for both Application Load Balancers.&lt;/li&gt;
&lt;li&gt;Verified that both application endpoints are healthy.&lt;/li&gt;
&lt;li&gt;Enabled continuous monitoring of our application.&lt;/li&gt;
&lt;li&gt;Prepared the architecture for automatic failover.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next part, we'll configure AWS Global Accelerator and connect it to both Application Load Balancers. This will provide users with a single global entry point and enable automatic traffic failover whenever a Region becomes unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring AWS Global Accelerator
&lt;/h2&gt;

&lt;p&gt;Up to this point, we've built two independent application environments:&lt;/p&gt;

&lt;p&gt;Primary Region (us-east-1)&lt;br&gt;
Secondary Region (us-west-2)&lt;/p&gt;

&lt;p&gt;Each environment has its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon VPC&lt;/li&gt;
&lt;li&gt;EC2 Instance&lt;/li&gt;
&lt;li&gt;Application Load Balancer&lt;/li&gt;
&lt;li&gt;Route 53 Health Check&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The final piece is giving users one consistent entry point regardless of which Region is serving the application.&lt;/p&gt;

&lt;p&gt;This is where AWS Global Accelerator comes in.&lt;/p&gt;

&lt;p&gt;Unlike DNS-based routing, Global Accelerator provides two static Anycast IP addresses and uses the AWS global network to direct users to the best available endpoint. If a Region becomes unhealthy, traffic is automatically routed to another healthy Region with minimal disruption.&lt;/p&gt;

&lt;p&gt;In this section, we'll configure AWS Global Accelerator and connect it to the Application Load Balancers we created earlier.&lt;/p&gt;

&lt;h2&gt;
  
  
  How AWS Global Accelerator Works
&lt;/h2&gt;

&lt;p&gt;When a user accesses your application, they don't connect directly to an EC2 instance or an Application Load Balancer.&lt;/p&gt;

&lt;p&gt;Instead, they connect to the Global Accelerator endpoint.&lt;/p&gt;

&lt;p&gt;Global Accelerator evaluates the health of each configured endpoint and routes traffic to the optimal Region.&lt;/p&gt;

&lt;p&gt;If an endpoint becomes unavailable, traffic is redirected automatically without requiring DNS updates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2gy2mznn9ggj80h89r1z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2gy2mznn9ggj80h89r1z.png" alt=" " width="785" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 17: Create a Global Accelerator
&lt;/h2&gt;

&lt;p&gt;From the AWS Management Console, navigate to:&lt;/p&gt;

&lt;p&gt;AWS Global Accelerator&lt;br&gt;
→ Create Accelerator&lt;/p&gt;

&lt;p&gt;Configure the accelerator using the following settings.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Name              Multi-Region-Web-App&lt;br&gt;
IP Address Type   IPv4&lt;br&gt;
Enabled           Yes&lt;/p&gt;

&lt;p&gt;Leave the remaining settings at their default values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Click Create Accelerator.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After a few moments, AWS will provision your accelerator and assign two static Anycast IP addresses.&lt;/p&gt;

&lt;p&gt;These IP addresses remain the same even if the backend infrastructure changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh7ehlvem9pxl8uy80jxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh7ehlvem9pxl8uy80jxj.png" alt=" " width="753" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 18: Configure the Listener
&lt;/h2&gt;

&lt;p&gt;Once the accelerator has been created, the next step is to configure a listener.&lt;/p&gt;

&lt;p&gt;A listener defines which ports Global Accelerator accepts from clients.&lt;/p&gt;

&lt;p&gt;Use the following configuration.&lt;/p&gt;

&lt;p&gt;Setting Value&lt;br&gt;
Protocol    TCP&lt;br&gt;
Port            80&lt;/p&gt;

&lt;p&gt;Click Next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhd13r4pwe5tpl8n0tbwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhd13r4pwe5tpl8n0tbwk.png" alt=" " width="727" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 19: Create an Endpoint Group
&lt;/h2&gt;

&lt;p&gt;Global Accelerator organizes endpoints into Endpoint Groups.&lt;/p&gt;

&lt;p&gt;Each endpoint group represents an AWS Region.&lt;/p&gt;

&lt;p&gt;We'll create one endpoint group for each Region.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primary Endpoint Group&lt;/strong&gt;&lt;br&gt;
Setting                   Value&lt;br&gt;
Region                   us-east-1&lt;br&gt;
Traffic Dial             100%&lt;br&gt;
Health Check Protocol    HTTP&lt;br&gt;
Health Check Port    80&lt;br&gt;
Health Check Path    /&lt;/p&gt;

&lt;p&gt;Repeat the process for the secondary Region.&lt;/p&gt;

&lt;p&gt;Secondary Endpoint Group&lt;br&gt;
Setting                 Value&lt;br&gt;
Region                us-west-2&lt;br&gt;
Traffic Dial            100%&lt;br&gt;
Health Check Protocol   HTTP&lt;br&gt;
Health Check Port   80&lt;br&gt;
Health Check Path   /&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 20: Add the Application Load Balancers
&lt;/h2&gt;

&lt;p&gt;Within each endpoint group, add the corresponding Application Load Balancer.&lt;/p&gt;

&lt;p&gt;Endpoint Group 1&lt;br&gt;
Endpoint        Weight&lt;br&gt;
primary-alb     128&lt;br&gt;
Endpoint Group       2&lt;br&gt;
Endpoint        Weight&lt;br&gt;
secondary-alb       128&lt;/p&gt;

&lt;p&gt;The endpoint weight determines how traffic is distributed among endpoints within the same group. Since each group contains only one ALB, the default weight is appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 21: Deploy the Accelerator
&lt;/h2&gt;

&lt;p&gt;Review your configuration and click Create Accelerator.&lt;/p&gt;

&lt;p&gt;Provisioning typically takes a few minutes.&lt;/p&gt;

&lt;p&gt;Once complete, you'll receive:&lt;/p&gt;

&lt;p&gt;A Global Accelerator DNS name&lt;br&gt;
Two static Anycast IP addresses&lt;/p&gt;

&lt;p&gt;Your application can now be accessed through a single global endpoint instead of directly through either Application Load Balancer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxnvzvc3v1tbev2l0y54g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxnvzvc3v1tbev2l0y54g.png" alt=" " width="795" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Verifying the Configuration
&lt;/h2&gt;

&lt;p&gt;Open a browser and navigate to the Global Accelerator DNS name.&lt;/p&gt;

&lt;p&gt;You should see your application load successfully.&lt;/p&gt;

&lt;p&gt;Depending on your location and routing policies, the request may be served from either the primary or secondary Region.&lt;/p&gt;

&lt;p&gt;At this point, everything appears normal—but the real value of this architecture becomes evident when a Region fails.&lt;/p&gt;

&lt;p&gt;We'll test that in the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use AWS Global Accelerator Instead of DNS Failover?
&lt;/h2&gt;

&lt;p&gt;This is a common question among engineers.&lt;/p&gt;

&lt;p&gt;Traditional DNS failover relies on DNS record updates and caching.&lt;/p&gt;

&lt;p&gt;Because DNS responses are cached by clients and Internet Service Providers, failover may not happen immediately.&lt;/p&gt;

&lt;p&gt;AWS Global Accelerator takes a different approach.&lt;/p&gt;

&lt;p&gt;Instead of relying on DNS changes, it uses the AWS global network and continuously monitors endpoint health.&lt;/p&gt;

&lt;p&gt;This allows traffic to be redirected much faster, improving both availability and user experience.&lt;/p&gt;

&lt;p&gt;For applications where uptime is critical, Global Accelerator is often a better choice than DNS-only failover.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Accomplished
&lt;/h2&gt;

&lt;p&gt;At this point, we've successfully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created an AWS Global Accelerator&lt;/li&gt;
&lt;li&gt;Configured a listener&lt;/li&gt;
&lt;li&gt;Added endpoint groups for two AWS Regions&lt;/li&gt;
&lt;li&gt;Registered both Application Load Balancers&lt;/li&gt;
&lt;li&gt;Verified that the accelerator is healthy and ready to serve traffic
The architecture is now fully configured.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next section, we'll intentionally simulate a regional outage to validate the failover process and observe how Global Accelerator automatically redirects traffic to the healthy Region.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Automatic Failover
&lt;/h2&gt;

&lt;p&gt;A highly available architecture isn't complete until it's been tested.&lt;/p&gt;

&lt;p&gt;Up to this point, we've deployed our application across two AWS Regions, configured health checks, and set up AWS Global Accelerator to route traffic intelligently.&lt;/p&gt;

&lt;p&gt;Now it's time to answer the most important question:&lt;/p&gt;

&lt;p&gt;What happens if the primary Region becomes unavailable?&lt;/p&gt;

&lt;p&gt;Instead of assuming the architecture will work as expected, we'll intentionally simulate a failure and observe how AWS responds.&lt;/p&gt;

&lt;p&gt;Testing failover is a critical part of any disaster recovery strategy. It provides confidence that your application can continue serving users even when unexpected failures occur.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 22: Verify the Application Before Testing
&lt;/h2&gt;

&lt;p&gt;Before simulating a failure, open the AWS Global Accelerator DNS name in your browser.&lt;/p&gt;

&lt;p&gt;The application should load successfully.&lt;/p&gt;

&lt;p&gt;Depending on your location and Global Accelerator's routing decisions, you should see the page served from your primary Region.&lt;/p&gt;

&lt;p&gt;This confirms that the application is healthy and ready for testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 23: Simulate a Regional Failure
&lt;/h2&gt;

&lt;p&gt;There are several ways to simulate a failure.&lt;/p&gt;

&lt;p&gt;For this lab, we'll stop the Apache web server running on the EC2 instance in the Primary Region.&lt;/p&gt;

&lt;p&gt;Connect to the primary EC2 instance using SSH.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp5vife9iqpk33xlrwd5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp5vife9iqpk33xlrwd5a.png" alt=" " width="800" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, the Application Load Balancer in the primary Region will no longer receive successful responses from the web server.&lt;/p&gt;

&lt;p&gt;After several failed health checks, the target will be marked as Unhealthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 24: Observe Automatic Failover
&lt;/h2&gt;

&lt;p&gt;Wait a few moments while Route 53 Health Checks detect the failure.&lt;/p&gt;

&lt;p&gt;Once the endpoint is marked as unhealthy, AWS Global Accelerator automatically stops routing traffic to the primary Region.&lt;/p&gt;

&lt;p&gt;Refresh your browser using the same Global Accelerator DNS name.&lt;/p&gt;

&lt;p&gt;You should now see the application being served from the Secondary Region (us-west-2).&lt;/p&gt;

&lt;p&gt;Notice that the URL remains exactly the same.&lt;/p&gt;

&lt;p&gt;No DNS changes are required.&lt;/p&gt;

&lt;p&gt;No manual intervention is needed.&lt;/p&gt;

&lt;p&gt;From the user's perspective, the application remains available despite the failure of one Region.&lt;/p&gt;

&lt;p&gt;This seamless transition is one of the key advantages of AWS Global Accelerator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 25: Restore the Primary Region
&lt;/h2&gt;

&lt;p&gt;Now let's bring the primary application back online.&lt;/p&gt;

&lt;p&gt;Reconnect to the EC2 instance in us-east-1 and start the Apache service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fadl5cmbde28u3sp2si18.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fadl5cmbde28u3sp2si18.png" alt=" " width="799" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a few successful health checks, Route 53 will mark the endpoint as healthy again.&lt;/p&gt;

&lt;p&gt;Global Accelerator will automatically resume routing traffic to the primary Region based on its endpoint health.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Observed
&lt;/h2&gt;

&lt;p&gt;This test demonstrates several important concepts about highly available architectures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application health is continuously monitored.&lt;/li&gt;
&lt;li&gt;Failed endpoints are automatically removed from service.&lt;/li&gt;
&lt;li&gt;Traffic is redirected without requiring DNS changes.&lt;/li&gt;
&lt;li&gt;Users continue accessing the application through the same global endpoint.&lt;/li&gt;
&lt;li&gt;Once the failed Region recovers, it is automatically added back into service.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These behaviors are essential for building resilient cloud applications that can withstand infrastructure failures with minimal impact on end users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;One of the biggest lessons from this project is that high availability isn't just about deploying resources across multiple Regions.&lt;/p&gt;

&lt;p&gt;It's about designing an architecture that can detect failures, respond automatically, and recover without requiring manual intervention.&lt;/p&gt;

&lt;p&gt;That's exactly what we've accomplished by combining Route 53 Health Checks with AWS Global Accelerator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleaning Up Your AWS Resources
&lt;/h2&gt;

&lt;p&gt;Congratulations! You've successfully built and tested a highly available multi-region web application on AWS.&lt;/p&gt;

&lt;p&gt;If you created these resources in your own AWS account, it's important to remove them once you're done with the lab. Leaving resources running can result in unexpected charges, especially for services such as AWS Global Accelerator and Application Load Balancers.&lt;/p&gt;

&lt;p&gt;In this section, we'll clean up the environment in a logical order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 26: Delete the AWS Global Accelerator
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;AWS Global Accelerator&lt;br&gt;
→ Accelerators&lt;/p&gt;

&lt;p&gt;Select the accelerator you created and choose Delete.&lt;/p&gt;

&lt;p&gt;Deleting the accelerator first ensures that it no longer references your Application Load Balancers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 27: Delete the Route 53 Health Checks
&lt;/h2&gt;

&lt;p&gt;Next, navigate to:&lt;/p&gt;

&lt;p&gt;Route 53&lt;br&gt;
→ Health Checks&lt;/p&gt;

&lt;p&gt;Delete both health checks:&lt;/p&gt;

&lt;p&gt;Primary-ALB-Health-Check&lt;br&gt;
Secondary-ALB-Health-Check&lt;/p&gt;

&lt;p&gt;Since these health checks are no longer needed, removing them prevents unnecessary monitoring costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 28: Delete the Application Load Balancers
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;EC2&lt;br&gt;
→ Load Balancers&lt;/p&gt;

&lt;p&gt;Delete:&lt;/p&gt;

&lt;p&gt;primary-alb&lt;br&gt;
secondary-alb&lt;/p&gt;

&lt;p&gt;Keep in mind that AWS may take a few minutes to completely remove each load balancer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 29: Delete the Target Groups
&lt;/h2&gt;

&lt;p&gt;After the load balancers have been deleted, navigate to:&lt;/p&gt;

&lt;p&gt;EC2&lt;br&gt;
→ Target Groups&lt;/p&gt;

&lt;p&gt;Delete:&lt;/p&gt;

&lt;p&gt;primary-target-group&lt;br&gt;
secondary-target-group&lt;/p&gt;

&lt;p&gt;Target groups cannot be deleted while they are still associated with an active load balancer, which is why this step comes after deleting the ALBs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 30: Terminate the EC2 Instances
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;EC2&lt;br&gt;
→ Instances&lt;/p&gt;

&lt;p&gt;Select both EC2 instances and choose:&lt;/p&gt;

&lt;p&gt;Instance State&lt;br&gt;
→ Terminate Instance&lt;/p&gt;

&lt;p&gt;Wait until their status changes to Terminated before proceeding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 31: Delete the Security Groups
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Security Groups&lt;/p&gt;

&lt;p&gt;Delete the custom security groups you created for this project.&lt;/p&gt;

&lt;p&gt;If AWS prevents you from deleting a security group, double-check that no resources are still attached to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 32: Delete the Internet Gateways
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Internet Gateways&lt;/p&gt;

&lt;p&gt;Before deleting each Internet Gateway, you'll need to detach it from its VPC.&lt;/p&gt;

&lt;p&gt;Select the Internet Gateway, then choose:&lt;/p&gt;

&lt;p&gt;Actions&lt;br&gt;
→ Detach from VPC&lt;/p&gt;

&lt;p&gt;Once detached, delete the Internet Gateway.&lt;/p&gt;

&lt;p&gt;Repeat this process for both Regions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 33: Delete the Subnets
&lt;/h2&gt;

&lt;p&gt;Navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Subnets&lt;/p&gt;

&lt;p&gt;Delete the public subnet in each Region.&lt;/p&gt;

&lt;p&gt;AWS will prevent subnet deletion if resources still exist within it, so ensure all EC2 instances have been terminated first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 34: Delete the VPCs
&lt;/h2&gt;

&lt;p&gt;Finally, navigate to:&lt;/p&gt;

&lt;p&gt;VPC&lt;br&gt;
→ Your VPCs&lt;/p&gt;

&lt;p&gt;Delete:&lt;/p&gt;

&lt;p&gt;primary-vpc&lt;br&gt;
secondary-vpc&lt;/p&gt;

&lt;p&gt;At this point, all resources created during this project should have been removed from your AWS account.&lt;/p&gt;

&lt;p&gt;Cleanup Checklist&lt;/p&gt;

&lt;p&gt;Use this checklist to verify that you've removed everything:&lt;/p&gt;

&lt;p&gt;✅ AWS Global Accelerator deleted&lt;br&gt;
✅ Route 53 Health Checks deleted&lt;br&gt;
✅ Application Load Balancers deleted&lt;br&gt;
✅ Target Groups deleted&lt;br&gt;
✅ EC2 Instances terminated&lt;br&gt;
✅ Security Groups deleted&lt;br&gt;
✅ Internet Gateways detached and deleted&lt;br&gt;
✅ Public Subnets deleted&lt;br&gt;
✅ VPCs deleted&lt;/p&gt;

&lt;p&gt;Completing this checklist helps ensure you don't incur unnecessary AWS charges after finishing the lab.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion and Lessons Learned
&lt;/h2&gt;

&lt;p&gt;Building cloud infrastructure is one thing.&lt;/p&gt;

&lt;p&gt;Building infrastructure that can withstand failure is another.&lt;/p&gt;

&lt;p&gt;_In this tutorial, we went beyond deploying a simple web application. We designed and implemented a highly available architecture capable of automatically redirecting traffic when an AWS Region becomes unavailable.&lt;br&gt;
_&lt;br&gt;
Along the way, we explored how several AWS services work together to deliver a resilient solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon VPC provided isolated networking environments.&lt;/li&gt;
&lt;li&gt;Amazon EC2 hosted the application in each Region.&lt;/li&gt;
&lt;li&gt;Application Load Balancers distributed traffic and performed health checks on application instances.&lt;/li&gt;
&lt;li&gt;Amazon Route 53 Health Checks continuously monitored endpoint availability.&lt;/li&gt;
&lt;li&gt;AWS Global Accelerator provided a single global entry point and intelligent traffic routing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most valuable part of this project wasn't creating the infrastructure—it was validating that the architecture behaved as expected during a simulated regional outage. Watching traffic automatically shift to the healthy Region reinforced an important principle of cloud engineering:&lt;/p&gt;

&lt;p&gt;A resilient architecture isn't defined by the resources you deploy. It's defined by how those resources respond when failures occur.&lt;/p&gt;

&lt;p&gt;This project also highlighted the importance of testing disaster recovery plans. Designing for failure is only part of the process; regularly validating your recovery strategy is what builds confidence in production systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Considerations
&lt;/h2&gt;

&lt;p&gt;Although this project demonstrates the core concepts of high availability and multi-region failover, there are several ways it could be enhanced for a production environment:&lt;/p&gt;

&lt;p&gt;Replace standalone EC2 instances with Auto Scaling Groups to improve scalability and resilience.&lt;br&gt;
Use Amazon RDS Multi-AZ or Amazon Aurora Global Database for highly available databases.&lt;br&gt;
Secure the application with HTTPS using AWS Certificate Manager (ACM).&lt;br&gt;
Protect the application using AWS WAF and AWS Shield.&lt;br&gt;
Improve global performance with Amazon CloudFront.&lt;br&gt;
Provision the infrastructure using Terraform or AWS CloudFormation instead of manually creating resources.&lt;br&gt;
Centralize monitoring and alerting with Amazon CloudWatch and AWS CloudTrail.&lt;/p&gt;

&lt;p&gt;These enhancements reflect how similar architectures are commonly implemented in production environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This project deepened my understanding of high availability, disaster recovery, and global traffic management on AWS. More importantly, it reinforced the value of designing systems with failure in mind rather than treating resilience as an afterthought.&lt;/p&gt;

&lt;p&gt;I hope this guide has helped you understand not only how to build a multi-region architecture, but also why each component plays a critical role in delivering a reliable application.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you followed along, I'd love to hear about your experience. Did you encounter any challenges? Were there any improvements or alternative approaches you explored? Feel free to share your thoughts in the comments, I'd be interested to learn how you approached the project.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ai</category>
      <category>linux</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
