← Back to Index
Chapter 09 of 20

CloudFront & Route 53

Domain 3 — High-Performing Architectures (24%)
🌍
Question 1Scenario

A company hosts its application in us-east-1 and wants an automatic DNS failover to a backup site in eu-west-1 if the primary becomes unhealthy. Which Route 53 routing policy enables active-passive failover?

Explanation

Route 53 Failover routing requires a health check on the primary record. When the health check fails, Route 53 automatically routes DNS queries to the secondary (failover) record. This is an active-passive setup. Weighted routing distributes traffic but doesn't provide automatic failover. Latency routing picks the fastest endpoint but doesn't consider health status automatically.

Question 2Scenario

A global company serves static assets (images, CSS, JavaScript) from an S3 bucket in us-east-1. Users in Asia and Europe experience high latency. What is the MOST cost-effective solution to reduce latency worldwide?

Explanation

CloudFront is AWS's global CDN with 450+ points of presence. Content is cached at the nearest edge location to the end user, dramatically reducing latency. Using S3 as origin with CloudFront is the standard pattern for static content delivery. S3 Transfer Acceleration improves upload speeds from users to S3, not content delivery to users.

Question 3Scenario

A developer deployed new versions of JavaScript files to S3 but users are still seeing the old cached versions from CloudFront. What is the quickest way to force CloudFront to serve the updated files?

Explanation

CloudFront Invalidations remove specified objects from all edge caches before the TTL expires. You can invalidate specific paths (e.g., /js/app.js) or wildcards (e.g., /js/*). Note that the first 1,000 invalidation paths per month are free; additional paths are charged. A better long-term strategy is versioned file names (app.v2.js) to avoid needing invalidations.

Question 4Scenario

A company runs a paid video streaming service behind CloudFront. They need to ensure only authenticated, paying subscribers can access video files, with time-limited access tokens. Which CloudFront feature provides this?

Explanation

Signed URLs are ideal when restricting individual files or when users don't support cookies. Signed Cookies are better for restricting access to multiple files in one distribution (e.g., all videos in a premium subscription). Both use an expiry timestamp and a cryptographic signature generated with a CloudFront key pair.

Question 5Knowledge

What is the key advantage of a Route 53 Alias record over a standard CNAME record?

Explanation

DNS CNAME records cannot exist at the zone apex (root domain, e.g., example.com) — only at subdomains. Route 53 Alias records overcome this limitation and can map the apex to AWS resources like ELBs, CloudFront distributions, S3 website endpoints, and other Route 53 records. Alias records are also free (no charge per query) when pointing to AWS resources.