Question 7:
You are working on a small project for your personal usage. The application is hosted in an Auto Scaling group. There is only 1 instance in the ASG and the EC2 instance may be terminated and recreated from time to time. The EC2 DNS name and IP are changed when a new instance is launched in the ASG. You own a hosted zone in Route 53 and plan to create a record set to route the traffic to the instance. You have very limited budget. Which method is the most cost-efficient to update the record set dynamically?
Answer options:
A.Create a network load balancer to point to the Auto Scaling group. Create an Alias record that routes the traffic to the load balancer. B.Create an Alias record in Route 53 that has the Auto Scaling group ARN as its target. The Route 53 record set does not need to be changed dynamically. C.Configure a CloudWatch Event rule to monitor the Auto Scaling events. The CloudWatch Event rule triggers a Lambda function to point the CNAME of the record set to the DNS of the new EC2 instance. D.Create a Lambda function to periodically check the Auto Scaling group. If there is a new EC2 instance launched, update the Route 53 record set with the new IP address.