DOP-C02 Question 280
Select 3Your team manages a critical web application running on Amazon EC2 instances in an Auto Scaling group. To ensure high availability, you need to monitor instance health and automatically take corrective actions if an instance becomes unhealthy. You also want to notify the operations team via email whenever such recovery actions are initiated. Which combination of actions will achieve this?
- A
Create a CloudWatch alarm to monitor the EC2 instance status checks and configure it to send notifications to an Amazon SNS topic.
- B
Subscribe the operations team’s email address to the Amazon SNS topic to receive notifications.
- C
Enable EC2 automatic recovery for the instances to automatically recover unhealthy instances.
- D
Configure the Auto Scaling group’s health check type to EC2 and set up a termination policy to replace unhealthy instances.
- E
Create a Lambda function that terminates unhealthy EC2 instances and subscribe it to the CloudWatch alarm.
Show answer and explanation
Correct answers: A, B, C
Explanation
To monitor and handle EC2 instance health issues, you can use a CloudWatch alarm to detect unhealthy instances based on status checks, and use Amazon SNS to notify the operations team. Enabling EC2 automatic recovery ensures that instances are automatically recovered without manual intervention. The other options, while potentially useful in other scenarios, are not required to achieve the specific objectives described in this question.
- A. Correct.
Correct. A CloudWatch alarm monitoring EC2 instance status checks can detect unhealthy instances and trigger alerts or actions based on your configuration.
- B. Correct.
Correct. Subscribing an email address to an Amazon SNS topic ensures that the operations team is notified when the CloudWatch alarm is triggered.
- C. Correct.
Correct. Enabling EC2 automatic recovery ensures that unhealthy instances are automatically recovered, reducing downtime.
- D. Incorrect.
Incorrect. While configuring the Auto Scaling group’s health check type and termination policy can help replace unhealthy instances, it is not required for EC2 automatic recovery or alert notifications.
- E. Incorrect.
Incorrect. A Lambda function to terminate unhealthy instances is unnecessary because EC2 automatic recovery handles the recovery process without requiring custom scripts.