ANS-C01 Question 295
Single answerYour organization is using Route 53 as a DNS service for a web application hosted on AWS. The application uses an Application Load Balancer (ALB) for distributing traffic. You need to configure DNS to resolve the domain name 'www.example.com' to the ALB. Which DNS record type should you use to achieve this?
- A
A record
- B
CNAME record
- C
TXT record
- D
Alias record
Show answer and explanation
Correct answer: D
Explanation
Alias records in Route 53 are the recommended choice for mapping domain names to AWS resources like an Application Load Balancer (ALB). Unlike A or CNAME records, Alias records can work at the zone apex and are optimized for integration with AWS services. This makes them the ideal choice in this scenario.
- A. Incorrect.
An A record maps a domain name to an IPv4 address. However, an ALB does not provide a static IP address, so an A record cannot be used directly to resolve the domain name to the ALB.
- B. Incorrect.
A CNAME record can map one domain name to another domain name. However, it cannot be used at the zone apex (e.g., 'example.com'), and AWS recommends using Alias records for AWS resources like ALBs.
- C. Incorrect.
A TXT record is used to store arbitrary text data, often for purposes like domain verification or email authentication, and is not used for resolving domain names to resources like an ALB.
- D. Correct.
Alias records in Route 53 can map a domain name to AWS resources such as an ALB, S3 bucket, or CloudFront distribution. They are specifically designed for use with AWS services and can be used at the zone apex.