AWS Route 53 and DNS Management

AWS Route 53 is a highly available and scalable Domain Name System (DNS) service. It translates human-readable domain names (like www.myshop.com) into the IP addresses that computers use to connect to servers. Route 53 also handles domain registration and health checking for routing decisions.

The name "Route 53" is a reference to TCP/UDP port 53, which is the standard port used for DNS communication.

What Is DNS?

DNS is like a phone book for the internet. When a user types www.myshop.com into a browser, the computer does not know which server to connect to. DNS resolves the domain name into an IP address like 52.14.30.100. The browser then connects to that IP address.

[User types: www.myshop.com]
            |
     [DNS Resolver — ISP]
            |
       [Route 53]
            |
   Returns: 52.14.30.100
            |
[Browser connects to server at 52.14.30.100]

Route 53 Core Features

1. Domain Registration

Route 53 allows registering domain names directly. Common TLDs (top-level domains) like .com, .net, .org, .in, and many others are available for purchase. Route 53 acts as the domain registrar and automatically configures the hosted zone for the domain.

2. Hosted Zones

A Hosted Zone is a container for DNS records of a specific domain. When a domain is registered (or transferred to Route 53), a Hosted Zone is created automatically.

Two types of Hosted Zones:

  • Public Hosted Zone: Resolves DNS queries from the internet. Used for publicly accessible websites.
  • Private Hosted Zone: Resolves DNS queries only within a specific VPC. Used for internal services — for example, resolving db.internal.mycompany.com to the RDS endpoint within the VPC.

3. DNS Record Types

Record TypePurposeExample
AMaps domain to IPv4 addressmyshop.com → 52.14.30.100
AAAAMaps domain to IPv6 addressmyshop.com → 2600:1f18::1
CNAMEMaps domain to another domain namewww.myshop.com → myshop.com
AliasAWS-specific — maps to AWS resourcesmyshop.com → ALB DNS name
MXSpecifies email serversmyshop.com → mail.myshop.com
TXTStores text — used for domain verificationSPF, DKIM, Google site verification
NSName server records — identifies Route 53 servers for the domainns-123.awsdns-45.com
SOAStart of Authority — administrative info about the zoneCreated automatically by Route 53

Alias Records vs CNAME

AWS Alias records are unique to Route 53 and work differently from standard CNAME records:

  • Alias records can point directly to AWS resources like an ALB, CloudFront distribution, or S3 bucket endpoint — CNAME cannot be used at the zone apex (root domain like myshop.com).
  • Alias record queries are free. CNAME queries are billed.
  • Alias records automatically track IP changes of the AWS resource.

Route 53 Routing Policies

Routing policies define how Route 53 responds to DNS queries. This is one of Route 53's most powerful features — it allows intelligent traffic routing:

1. Simple Routing

The most basic policy — maps a domain to a single resource. No health checks or routing logic. Used for single-server setups.

2. Weighted Routing

Distributes traffic across multiple resources based on assigned weights. Useful for A/B testing or gradual deployments.

myshop.com DNS query
  |
  +-- 90% of traffic → Server A (production: v2.0)
  +-- 10% of traffic → Server B (testing: v2.1 beta)

3. Latency-Based Routing

Routes users to the AWS Region with the lowest network latency. A user in Mumbai gets routed to ap-south-1. A user in London gets routed to eu-west-1. Route 53 measures latency continuously and always selects the fastest Region.

4. Failover Routing

Routes traffic to a primary resource. If the primary fails health checks, traffic is automatically directed to a standby resource. This enables DNS-level disaster recovery.

PRIMARY: EC2 in ap-south-1 (Mumbai) ← traffic goes here normally
         |
Health check: FAIL
         |
SECONDARY: EC2 in us-east-1 (Virginia) ← traffic automatically redirects here

5. Geolocation Routing

Routes users based on their physical location (country or continent). A user from India is routed to the India server. A user from Germany is routed to the Europe server. This is useful for serving region-specific content, complying with data regulations, and providing localized language content.

6. Geoproximity Routing

Routes traffic based on geographic distance between users and resources. A bias value expands or shrinks the routing area for each resource. Available only with Route 53 Traffic Flow.

7. Multi-Value Answer Routing

Returns multiple IP addresses in response to DNS queries (up to 8). Each entry can have a health check. Unhealthy entries are removed from responses. This provides basic load balancing at the DNS level (not a replacement for ALB).

8. IP-Based Routing

Routes traffic based on the originating IP address range (CIDR block). Useful for directing traffic from specific networks — for example, office IP ranges to internal application servers.

Route 53 Health Checks

Health checks monitor the availability and performance of endpoints. Route 53 periodically sends HTTP/HTTPS/TCP requests to the endpoint and records the response. Supported check types:

  • Endpoint health check: Checks a specific IP address or domain name.
  • Calculated health check: Combines multiple health check results using AND/OR logic.
  • CloudWatch alarm health check: Marks an endpoint as unhealthy if a specific CloudWatch alarm is triggered.

Health checks are used with Failover routing to automatically redirect traffic away from unhealthy resources.

Complete DNS Architecture Example

[User types: www.myshop.com]
           |
      [Route 53]
           |
    [Routing: Latency]
    /                \
[ap-south-1]     [us-east-1]
  (Mumbai)        (Virginia)
     |                |
  [ALB]            [ALB]
     |                |
[EC2 Servers]   [EC2 Servers]
     |                |
      \              /
       [Same RDS — Aurora Global]

Route 53 Pricing

  • Hosted Zone: $0.50/month per hosted zone
  • DNS Queries: $0.40 per 1 million queries for the first 1 billion, then $0.20
  • Health Checks: $0.50/month per endpoint check (AWS endpoints) or $0.75/month (non-AWS)
  • Domain Registration: Varies by TLD — .com is $13/year

Summary

  • Route 53 provides DNS, domain registration, and health-check-based routing for AWS applications.
  • A Hosted Zone holds DNS records for a domain. Public zones serve internet traffic. Private zones serve VPC-internal traffic.
  • Routing policies include Simple, Weighted, Latency, Failover, Geolocation, and Multi-Value — each designed for specific traffic management scenarios.
  • Health Checks monitor endpoints and remove unhealthy targets from DNS responses automatically.
  • Alias records are the preferred way to point domains to AWS resources like ALBs and CloudFront distributions.

Leave a Comment