A web application runs on multiple Amazon EC2 instances that are placed in individual target groups behind an Application Load Balancer (ALB). The public site is available to users. Engineers need a development hostname that routes to a single development EC2 instance for testing, and this routing must automatically continue to work if the development instance is replaced. Using a Route 53 hosted zone, which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an A record for the development website that points to the ALB. Create an ALB listener rule that forwards requests for the development website to the target group that contains the development instance..
Why this is the answer
The correct solution leverages the ALB's listener rules to route traffic based on the hostname. By creating an A record pointing to the ALB, all traffic for the development hostname first reaches the ALB. Then, an ALB listener rule can be configured to inspect the hostname (e.g., dev.yourdomain.com) and forward requests specifically to the target group containing the single development EC2 instance. This approach ensures that if the development instance is replaced, as long as the new instance is added to the same target group, the routing continues to work automatically without needing to update Route 53. Incorrect options: Recreating the instance with a public IP and creating an A record for it would work initially, but if the instance is replaced, its public IP would likely change, requiring a manual update to the Route 53 A record, which fails the "automatically continue to work" requirement. Redirecting requests to the public IP of the development instance via an ALB listener rule is not ideal because it exposes the instance's IP directly and bypasses the benefits of the ALB for that specific traffic. Placing all instances in the same target group and using a single listener rule would distribute traffic across all instances, not just the development one, failing the requirement to route to a single development instance.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed