AWS Certified DevOps Engineer – Professional — Question 25

An application is deployed on Amazon EC2 instances running in an Auto Scaling group. During the bootstrapping process, the instances register their private IP addresses with a monitoring system. The monitoring system performs health checks frequently by sending ping requests to those IP addresses and sending alerts if an instance becomes non-responsive.
The existing deployment strategy replaces the current EC2 instances with new ones. A DevOps Engineer has noticed that the monitoring system is sending false alarms during a deployment, and is tasked with stopping these false alarms.
Which solution will meet these requirements without affecting the current deployment method?

Answer options

Correct answer: C

Explanation

Option C is the correct answer because it uses CloudWatch Events to invoke a Lambda function that removes the private IP from the monitoring system during instance termination, effectively preventing false alarms. Option A does not directly address the issue of false alarms since it involves SNS notifications rather than managing the IP entries. Option B, while it mentions a lifecycle hook, does not utilize CloudWatch Events for a seamless execution. Option D lacks the integration with CloudWatch Events, making it less efficient in managing the timing of the IP removal.