Q42 — AWS SAA-C03 Ch.12

Question 42 of 100 | ← Chapter 12

Q842. A solutions architect runs a web application on multiple Amazon EC2 instances that are in individual target groups behind an Application Load Balancer (ALB). Users can reach the application through a public website.The solutions architect wants to allow engineers to use a development version of the website to access one specific development EC2 instance to test new features for the application. The solutions architect wants to use an Amazon Route 53 hosted zone to give the engineers access to the development instance. The solution must automatically route to the development instance even if the development instance is replaced.Which solution will meet these requirements?

Correct Answer: A. Create an A Record for the development website that has the value set to the ALB. Create a listener rule on the ALB that forwards requests for the development website to the target group that contains the development instance.

Explanation

To meet the requirement of allowing engineers to access a specific development EC2 instance for testing new features, while ensuring automatic routing even if the development instance is replaced, the recommended solution is:A. Create an A Record for the development website that has the value set to the ALB. Create a listener rule on the ALB that forwards requests for the development website to the target group that contains the development instance.Here's why:Option A suggests creating an A Record for the development website with the value set to the Application Load Balancer (ALB). By configuring the ALB as the target of the DNS record, all traffic for the development website will be routed to the ALB.Additionally, a listener rule is created on the ALB to forward requests for the development website to the target group that contains the specific development EC2 instance. This ensures that requests specifically intended for the development instance are automatically routed to it.By using this approach, the ALB acts as a central entry point for all traffic, and the listener rule directs requests for the development website to the appropriate target group, even if the development instance is replaced. This allows for seamless testing of new features without the need to update DNS records or make manual changes when instances are replaced.Option B suggests recreating the development instance with a public IP address and creating an A Record with the value set to the public IP address. However, this solution requires manual updates to the DNS record whenever the development instance is replaced, which is not efficient or scalable.Option C suggests creating an A Record for the development website with the value set to the ALB and redirecting requests to the public IP address of the development instance. This approach introduces unnecessary complexity and bypasses the load balancer, making it difficult to ensure automatic routing and load balancing.Option D suggests placing all instances in the same target group and creating an A Record for the development website with the value set to the ALB. While this approach allows traffic to be directed to the ALB and load balanced across instances, it does not provide a mechanism to specifically route traffic to the development instance.Therefore, the recommended solution is to create an A Record for the development website with the value set to the ALB and configure a listener rule on the ALB to forward requests for the development website to the target group containing the development instance. This solution ensures automatic routing to the development instance even if it is replaced, providing a seamless testing environment for engineers.