Part 3: Geolocation Routing Policy

Introduction
In a globally distributed application, not all users should be treated the same. There are certain scenarios that would prompt you to block access to your web application:
Regulatory & Legal Compliance
Licensing & Content Distribution Rights
Fraud Prevention & Security Hardening
Service Availability Limitations
Beta Testing / Controlled Rollouts
Legal Liability & Risk Mitigation
Business Strategy / Market Focus
This is where Amazon Route 53 Geolocation Routing Policy becomes essential.
In this post, we’ll explore how to route traffic based on the user’s geographic location, with hands-on steps.
What is Geolocation Routing?
Geolocation routing allows you to route traffic based on:
Continent
Country
(in some cases in Ukraine) subdivisions
Prerequisites
Hosted zone in Route 53
At least 2 resources (EC2, ALB, etc.) in different regions
Public IPs or DNS endpoints
Step-by-Step Implementation
Step 1: Create First Record (Frankfurt)
Record name:
geolocationType: A
Value: IP of Europe server
Routing policy: Geolocation
Location: Countries/Regions→ Germany
Record ID: Choose what tag to use (Germany Server)
Step 2: Create Second Record (North Virginia)
Record name:
geolocationType: A
Value: IP of the North Virginia server
Routing policy: Geolocation
Location: Default (any traffic that is not from Germany gets routed to the North Virginia server)
Record ID: Every other traffic worldwide - North Virginia
Testing Geolocation Routing
I will use my proxy set to Germany to test out whether DNS works on resolver location.
So, my traffic now seems to come from Germany - Frankfurt
When I type http://geolocation.cloudproject.click it directs me to the German server
If I use my real traffic from Kenya, it directs me to the North Virginia server thus proving that the geolocation routing policy works



