DNS Routing & Domain Management
Secure and reliable DNS resolution is managed through AWS Route 53, providing a fast and flexible bridge between the custom domain name and the globally distributed infrastructure. This setup ensures that user requests are efficiently routed to the nearest content delivery edge.
Route 53 Hosted Zone Configuration
A public hosted zone was created in Route 53 to manage the DNS records for the domain. This provides a centralized and authoritative source for defining how traffic should be routed. The key to connecting the domain to the infrastructure is the use of Alias records.
Alias Records vs. CNAME
Instead of a traditional CNAME record, an Alias (A) record is used to point the domain's apex (e.g., `masonlivermore.com`) and its `www` subdomain to the CloudFront distribution. Alias records are superior as they are free, can be used at the zone apex (where CNAMEs cannot), and resolve more quickly, reducing DNS lookup latency.
Secure End-to-End Routing
Route 53 seamlessly integrates with other AWS services to provide a secure data path from the user's browser to the origin S3 bucket.
Integration with ACM
Route 53 is used to validate ownership of the domain for AWS Certificate Manager (ACM), which then provisions the free SSL/TLS certificate used by CloudFront.
Failover & Future-Proofing
While not implemented for this simple setup, Route 53's traffic policies could be used in the future to enable sophisticated routing strategies like blue-green deployments or disaster recovery failover.