Topic 1 Question #5
A company hosts its website on Amazon EC2 instances behind an Application Load Balancer. The company manages its DNS with Amazon Route 53, and wants to point its domain's zone apex to the website.Which type of record should be used to meet these requirements?
- A.
An AAAA record for the domain's zone apex
- B.
An A record for the domain's zone apex
- C.
A CNAME record for the domain's zone apex
- D.
An alias record for the domain's zone apex
Answer: D
The scenario requires pointing a Route 53 managed zone apex (root domain, e.g., example.com) to an Application Load Balancer (ALB) serving a website on EC2 instances. Core DNS standards prohibit CNAME records at the zone apex, as they conflict with required mandatory records (SOA, NS, MX) that exist only at the zone root. ALBs do not have static, persistent IP addresses, so standard A or AAAA records that point to fixed IP addresses cannot be reliably used, as ALB IPs change dynamically during scaling, patching, or infrastructure updates. Route 53 alias records are an AWS-specific feature designed to address this use case: they map a DNS record directly to an AWS resource (including ALBs) by its DNS name, automatically resolve to the current IP addresses of the target resource, support deployment at the zone apex without violating DNS standards, and do not incur Route 53 query charges for AWS resource targets. This perfectly meets the requirements of the scenario.
Option Analysis:
A. An AAAA record maps a DNS name to a static IPv6 address. ALBs do not have fixed static IPv6 addresses, so a standard AAAA record would become invalid when the ALB's IPv6 addresses change. Additionally, the scenario does not specify IPv6 support is required, so this option is incorrect.
B. A standard A record maps a DNS name to a static IPv4 address. ALBs use dynamic IPv4 addresses that change over time, so a static A record would break connectivity when the ALB's IPs update. This is not a reliable solution, so this option is incorrect.
C. DNS RFC 1912 explicitly prohibits CNAME records at the zone apex, as a CNAME record for a domain overrides all other record types for that domain, including required SOA, NS, and MX records that are critical to the operation of the hosted zone. Deploying a CNAME at the apex would break the domain, so this option is incorrect.
D. Route 53 alias records are purpose-built for routing traffic to AWS resources like ALBs, even at the zone apex. They automatically track changes to the ALB's underlying IP addresses, comply with DNS standards for zone apex records, and provide low-latency, cost-free routing to AWS resources. This exactly meets the scenario requirements, so this option is correct.
Key Concepts:
1. Route 53 Zone Apex Restrictions: Per DNS RFC 1912, the zone apex (root domain) cannot use a CNAME record, as CNAME records conflict with mandatory apex records including SOA, NS, and MX, which are required for hosted zone functionality.
2. Route 53 Alias Records: Alias records are an AWS-specific DNS record type that maps a record name to an AWS resource (ALB, CloudFront, S3 website, etc.) instead of a static IP address. They automatically update when the target resource's IP addresses change, support use at the zone apex, and do not incur Route 53 query fees for AWS resource targets.
3. Dynamic ALB IP Addressing: Application Load Balancers use ephemeral, dynamic IP addresses that change as AWS scales the load balancer to meet traffic demand or performs infrastructure maintenance, making static A/AAAA records unsuitable for routing traffic to ALBs long-term.
References:
Choosing between alias and non-alias records,
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html
Routing traffic to an ELB load balancer,
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html