Skip to content
VirtualLP Virtual Learning Platform

Route 53 DNS and CloudFront CDN

12 min read Topic 8 of 30 1 hands-on lab

Users reach your application by name and expect it to be fast everywhere. Route 53 answers DNS queries; CloudFront serves content from edge locations close to users.

flowchart LR
    U[User in Pune] -->|"1 DNS: shop.example.com?"| R53[Route 53]
    R53 -->|"2 alias → d123.cloudfront.net"| U
    U -->|3 HTTPS| E[CloudFront edge – Mumbai]
    E -->|cache miss| O1["Origin: S3 (static)"]
    E -->|"/api/*"| O2["Origin: ALB (dynamic)"]

Route 53

Concept Meaning
Hosted zone Container for the DNS records of a domain (public or private to a VPC)
A / AAAA Name → IPv4 / IPv6
CNAME Name → another name (not allowed at the zone apex)
Alias Route 53 extension: apex-capable pointer to AWS resources (ALB, CloudFront, S3 website) – free queries
MX, TXT, NS, SOA Mail, verification, delegation
TTL How long resolvers cache the answer

Routing policies

Policy Use
Simple One resource
Weighted Split traffic, e.g. 90/10 canary
Latency-based Send users to the lowest-latency Region
Failover Active–passive with health checks
Geolocation / geoproximity By user location
Multivalue answer Several healthy IPs

CloudFront

Concept Meaning
Distribution Your CDN configuration with a domain such as d123.cloudfront.net
Origin Where content comes from – S3, ALB, any HTTP server
Behaviour Path pattern → origin + cache policy (e.g. /api/* no caching)
TTL / cache policy How long edges keep objects; based on headers, cookies, query strings
Invalidation Remove objects from all edges after a deploy (/*)
ACM certificate Free TLS certificate (must be in us-east-1 for CloudFront)
Origin Access Control (OAC) Only CloudFront may read the private S3 bucket
AWS WAF, Shield Web firewall and DDoS protection at the edge
Key point

The modern static-site pattern is private S3 bucket + CloudFront with OAC + Route 53 alias + ACM certificate – fast, HTTPS, and the bucket is never public.

Practise it

Virtual lab · Amazon Web Services · 40 min

Serve a private S3 website worldwide with CloudFront, a custom domain and Route 53

Put CloudFront in front of a private S3 bucket with Origin Access Control, attach a custom domain with an ACM certificate and a Route 53 alias record, watch edge-cache hits and misses, and publish a new version with an invalidation.

Open lab

Quick revision

  1. Hosted zones hold records; alias records point the apex to AWS resources.
  2. Routing policies: simple, weighted, latency, failover, geo, multivalue.
  3. CloudFront caches at the edge; behaviours route paths to origins.
  4. Use OAC to keep S3 origins private; invalidate after deploys.
  5. ACM certificates for CloudFront live in us-east-1.

Practise this topic

Hands-on virtual lab

Apply what you just read in a realistic, guided simulation. Free with a verified account.

Create a free account to track your progress and unlock virtual labs.