Route 53, CloudFront and Global Accelerator: DNS Routing Policies, CDN Caching and Global Performance

AWS Solutions Architect 50 min min read Updated: Nov 17, 2026 Intermediate
Route 53, CloudFront and Global Accelerator: DNS Routing Policies, CDN Caching and Global Performance
Intermediate Topic 4 of 4

DNS in One Minute

DNS translates names like shop.example.com into IP addresses. A browser asks a resolver, which asks root, TLD (.com) and then the authoritative name servers for your domain. Route 53 can be your authoritative DNS (and also register domains).

Route 53 Basics

ConceptMeaning
Hosted zoneA container of DNS records for a domain. Public (internet) or Private (resolves only inside chosen VPCs)
Record typesA (IPv4), AAAA (IPv6), CNAME (name to name, not allowed at the zone apex), MX, TXT, NS, SRV, CAA
TTLHow long resolvers cache an answer. Lower TTL before a change for faster switch
Alias recordA Route 53-specific record pointing to an AWS resource (ALB, CloudFront, S3 website, API Gateway, Global Accelerator, another record). Works at the zone apex, free queries, follows IP changes, can use health checks
Health checkRoute 53 checks endpoints (HTTP, HTTPS, TCP), a CloudWatch alarm, or other health checks (calculated)
Alias vs CNAME: At the root domain (example.com) you cannot use a CNAME. Use an alias A record to an ALB or CloudFront. Prefer alias for AWS targets.
bash aws route53 create-hosted-zone --name example.com --caller-reference $(date +%s) cat > change.json <<'JSON' {"Changes":[{"Action":"UPSERT","ResourceRecordSet":{ "Name":"shop.example.com","Type":"A", "AliasTarget":{"HostedZoneId":"Z35SXDOTRQ7X7K","DNSName":"web-alb-123.ap-south-1.elb.amazonaws.com","EvaluateTargetHealth":true}}}]} JSON aws route53 change-resource-record-sets --hosted-zone-id Z123ABC --change-batch file://change.jso

Routing Policies

PolicyHow it routesUse for
SimpleOne record, possibly several values returned randomly. No health checks for multiple valuesOne resource
WeightedSplit by weights (for example 90/10)Canary releases, A/B tests, gradual migration
LatencyTo the Region with the lowest latency for the userMulti-Region apps for speed
FailoverPrimary and secondary (active-passive) using health checksDisaster recovery, a static maintenance page
GeolocationBy user's country or continentLanguage, licensing, legal limits, local content
GeoproximityBy distance between user and resources, with a bias to shift traffic (needs Traffic Flow)Shift load towards or away from a Region
Multivalue answerUp to 8 healthy records returnedSimple client-side load distribution with health checks
IP-basedBy the user's network (CIDR) locationRoute specific ISPs or corporate ranges
json {"Changes":[ {"Action":"UPSERT","ResourceRecordSet":{"Name":"api.example.com","Type":"A","SetIdentifier":"primary-mumbai","Failover":"PRIMARY","HealthCheckId":"abcd-1234", "AliasTarget":{"HostedZoneId":"Z35SXDOTRQ7X7K","DNSName":"alb-mum.ap-south-1.elb.amazonaws.com","EvaluateTargetHealth":true}}}, {"Action":"UPSERT","ResourceRecordSet":{"Name":"api.example.com","Type":"A","SetIdentifier":"secondary-ireland","Failover":"SECONDARY", "AliasTarget":{"HostedZoneId":"Z32O12XQLNTSW2","DNSName":"alb-ire.eu-west-1.elb.amazonaws.com","EvaluateTargetHealth":true}}}]}
  • Private hosted zones resolve internal names (like db.corp.internal) inside your VPCs
  • Route 53 Resolver with inbound/outbound endpoints connects DNS between your VPC and on-premises networks
  • DNSSEC signing and domain registration are supported
  • Failover and latency records combine (nested records) for complex designs

Amazon CloudFront

CloudFront is a content delivery network (CDN) with hundreds of edge locations that cache content close to users, lowering latency and taking load off your origin. It also provides HTTPS, DDoS protection with Shield Standard, and WAF integration.

ConceptMeaning
DistributionYour CloudFront configuration with a domain name (d111.cloudfront.net) and optional alternate domain names
OriginWhere content comes from: S3 bucket, ALB, EC2, API Gateway, any HTTP server, MediaPackage
Cache behaviorRules by path pattern (/images/*, /api/*) with their own origin, cache policy, allowed methods
Cache policy / TTLWhat is part of the cache key (headers, cookies, query strings) and how long objects live. Smaller cache key = better hit ratio
InvalidationRemove objects before TTL ends. First 1,000 paths per month free. Prefer versioned file names
Origin groupPrimary and secondary origin for origin failover
Price classLimit to cheaper edge regions to lower cost

Secure the Origin and Content

  • Origin Access Control (OAC): lets CloudFront read a private S3 bucket using SigV4. The bucket policy allows only the CloudFront service for that distribution. (OAC replaces the older OAI)
  • For ALB origins: restrict by a secret custom header or the CloudFront managed prefix list in the security group
  • Signed URLs (one file) and signed cookies (many files) give paid or private content access for limited time. Use key groups
  • Field-level encryption for sensitive form fields
  • AWS WAF and Shield at the edge, geo restriction, HTTPS only (redirect HTTP to HTTPS), a certificate from ACM in us-east-1
json { "Version": "2012-10-17", "Statement": [{ "Sid": "AllowCloudFrontServicePrincipal", "Effect": "Allow", "Principal": {"Service": "cloudfront.amazonaws.com"}, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::acme-site/*", "Condition": {"StringEquals": {"AWS:SourceArn": "arn:aws:cloudfront::123456789012:distribution/E1ABCDEF"}} }] }

Edge Compute

OptionRunsUse for
CloudFront FunctionsAt all edge locations, JavaScript, sub-millisecond, viewer request/response onlyURL rewrites, redirects, header changes, simple auth tokens
Lambda@EdgeRegional edge caches, more power (network, longer time, all four event types)Heavier logic, call other services, dynamic personalization

CloudFront Tips

  • Cache static content long (versioned names), API responses short or not at all
  • Use compression (gzip/brotli) and HTTP/2 and HTTP/3
  • Cache hit ratio and origin latency are the main metrics (CloudWatch)
  • Use real-time logs or standard logs to S3 for analysis
  • Dynamic content still benefits: CloudFront uses the AWS backbone to the origin and keeps connections open

AWS Global Accelerator

Global Accelerator gives you two static anycast IP addresses. User traffic enters the AWS global network at the nearest edge location and travels over the AWS backbone to your endpoints (ALB, NLB, EC2, Elastic IP) in one or more Regions. It does health checks and fast failover in seconds.

CloudFrontGlobal Accelerator
What it doesCaches content at the edgeRoutes traffic over the AWS network. No caching
Best forStatic and cacheable HTTP content, video, websitesNon-HTTP (TCP/UDP): gaming, IoT, VoIP; HTTP needing static IPs; fast regional failover
IP addressesMany, changing2 static anycast IPs you can allow-list
Failover speedOrigin failoverSeconds, no DNS cache problem
PricingPer request and data outFixed hourly fee plus data transfer premium
DNS-based failover is slower: Route 53 failover depends on TTL and resolver caching. Global Accelerator switches instantly because the IPs do not change.

Design Examples

NeedDesign
Global static websiteS3 private bucket + CloudFront (OAC) + ACM + Route 53 alias
Web app with users worldwide and one RegionCloudFront with the ALB as origin (dynamic acceleration, WAF)
Active-active in two Regions with lowest latencyRoute 53 latency records (or Global Accelerator) to ALBs in both Regions, replicated data
Active-passive disaster recoveryRoute 53 failover with health checks
Gaming server UDP traffic worldwideGlobal Accelerator with NLB endpoints
Private content for paid usersCloudFront signed URLs or cookies

Practice Tasks

  1. Create a hosted zone and an alias record pointing to an ALB
  2. Set up weighted records to send 10 percent of traffic to a test environment
  3. Configure failover routing with a health check and stop the primary to see the switch
  4. Serve an S3 site through CloudFront with OAC and verify that direct S3 access is blocked
  5. Explain when you would pick Global Accelerator over CloudFront

Conclusion

Route 53 provides DNS with alias records and routing policies (weighted, latency, failover, geolocation and more) plus health checks. CloudFront caches content at the edge with OAC for private origins, signed URLs and edge functions. Global Accelerator gives static anycast IPs and fast failover for non-cacheable or non-HTTP traffic.

Quick Summary: DNS + hosted zones; alias vs CNAME; routing policies table + failover JSON; CloudFront origins, behaviors, OAC, signed URLs, edge compute; Global Accelerator vs CloudFront; designs.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators