π§©Route-53


What is AWS Route 53?
AWS Route 53 is a scalable and highly available Domain Name System (DNS) web service. It performs three major functions:
Domain registration
DNS routing
Health checking
π¦ Core Components of Route 53
Component | Description |
Hosted Zone | Container for records for a domain |
Record Sets | Mapping from domain names to resources (e.g., A, CNAME, MX, etc.) |
Health Checks | Monitor health of resources like web servers |
Routing Policies | Define how Route 53 responds to DNS queries (Simple, Weighted, Failover, etc.) |
Domain Registration | Register domain names directly through Route 53 |
π§° Use Cases
Use Case | Example |
Website Hosting | Route traffic to S3 static website, EC2, or ELB |
Load Balancing | Distribute traffic using weighted routing to multiple regions |
Failover Setup | Automatically switch to backup site if primary fails (Failover Routing) |
Latency-Based Routing | Route users to closest AWS region for low latency |
Multi-region High Availability Setup | Combine latency + failover routing across regions |
Hybrid DNS Resolution | Resolve DNS between AWS and on-premises (using Route 53 Resolver) |
ποΈ Architecture Diagram (Overview)
sqlCopyEditUser Request
|
v
Route 53
|
+-- Public Hosted Zone
| +-- A Record --> Application Load Balancer (EC2, EKS, etc.)
|
+-- Private Hosted Zone
+-- Internal Services (e.g., *.internal.example.com)
βοΈ Workflow
Scenario: Deploying a Web App Using EC2 Behind ALB
Domain Registration (Optional):
- Buy domain from Route 53 or transfer an existing one.
Create a Hosted Zone:
- Public hosted zone for
myapp.com
.
- Public hosted zone for
Add DNS Records:
A
Record β Alias to Application Load BalancerCNAME
β Used for subdomains likewww.myapp.com
Attach Routing Policy:
Simple β For single target
Weighted β For blue-green deployments
Failover β For active-passive failover setup
Latency β For performance optimization
Health Check (Optional):
Monitor backend EC2 or endpoint
Route 53 will remove unhealthy resources from DNS response
πͺ Step-by-Step Setup (Example)
π― Objective: Route domain myapp.com
to an Application Load Balancer
β Prerequisites:
An EC2-based application behind an Application Load Balancer
A registered domain name (e.g., from Route 53 or GoDaddy)
IAM permissions to manage Route 53
π§ Steps:
1. Create Hosted Zone
Go to Route 53 β Hosted Zones
Click Create Hosted Zone
Choose type: Public Hosted Zone
Enter domain name:
myapp.com
2. Get NS Records
Copy the Name Server (NS) records generated
If domain is external, update nameservers at your registrar
3. Create A Record (Alias to ALB)
In your hosted zone, create a new record:
Type: A β IPv4 address
Alias: Yes
Alias Target: Choose your ALB
Routing Policy: Simple / Weighted / Latency, etc.
TTL: 60 seconds (default)
4. Optional: Create CNAME Record
5. Health Check (Optional)
Create health check to monitor EC2 or endpoint.
Attach health check to record for failover setup.
π¦ Routing Policy Examples
Type | Use Case | Example Setup |
Simple | Single endpoint | A β ALB/EC2 |
Weighted | Gradual traffic shifting or A/B testing | 80% traffic to us-east-1, 20% to us-west-2 |
Failover | High availability with active-passive setup | Primary = us-east-1, Secondary = us-west-2 |
Latency | Route to region with lowest latency | Users in India go to ap-south-1, US to us-east-1 |
Geolocation | Route based on userβs geographic location | Users in UK β EU servers, US β US servers |
Multivalue | Return multiple healthy endpoints (basic load balancing) | 3 healthy IPs for the same record |
ποΈ Architecture Example: Multi-region Failover
lessCopyEdit[Client]
|
v
[Route 53]
|
+-- Health check: us-east-1 ALB
| |
| v
| [App in us-east-1]
|
+-- (Failover if unhealthy)
|
v
[App in us-west-2]
β οΈ Best Practices
Use alias records instead of hardcoding IPs for AWS resources.
Use private hosted zones for internal services within a VPC.
Set up health checks + failover for high availability.
Use latency or geolocation routing for global apps.
Monitor DNS TTL and propagation delays when updating records.
π§ͺ Real-Time Use Case (Blue-Green Deployment)
Deploy v1 of your app to
blue.myapp.com
(ALB1)Deploy v2 to
green.myapp.com
(ALB2)Weighted routing:
Blue = 90%, Green = 10%
Gradually shift traffic
Monitor health check
Update
myapp.com
alias to point fully to green when stable
Subscribe to my newsletter
Read articles from Sivaranjan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Sivaranjan
Sivaranjan
Cloud & DevOps Engineer | AWS Solutions Architect | Terraform Associate | Love to work with #AWS #Terraform #Docker #Kubernetes #Jenkins #GitHub #Linux