You have created a new Auto Scaling group for a new application which sets the minimum capacity as 1 and the maximum capacity as 20
The ASG is running well for two weeks.
However, recently there were cases that some instances were not terminated successfully.
You need to work out a way to notify the team via email whenever any instance fails to terminate.
What is the simplest way to implement this?
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer - A.
Auto Scaling group can be easily configured to send an SNS notification whenever it scales.
The details can be found in https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html.
Option A is CORRECT: Because this is the simplest way and can be configured directly in the ASG console:
Option B is incorrect: Because the Auto Scaling configuration cannot be used to set up an SNS notification.
Option C is incorrect: Because an SNS notification should be used as a target instead of a Lambda function for a CloudWatch Event.
Option A is more straightforward than Option.
C.Option D is incorrect: Because ASG does not provide a CloudWatch metric of “Terminate Failed”.
The correct answer is A. Configure the Auto Scaling group to send a notification to an SNS topic whenever instances fail to terminate.
Explanation: Auto Scaling groups in AWS are designed to scale resources up and down based on the demand. They can automatically launch new instances and terminate old ones to maintain a target group size. However, sometimes instances may fail to terminate, and it is essential to know when this happens to take corrective action.
To address this issue, AWS provides several options for notification, such as CloudWatch Events, CloudWatch Alarms, and SNS topics. In this scenario, the simplest and most appropriate solution is to configure the Auto Scaling group to send a notification to an SNS topic whenever instances fail to terminate.
This can be achieved by creating an SNS topic and subscribing team members to it. Then, configure the Auto Scaling group to send a message to this SNS topic whenever an instance fails to terminate. This message will be forwarded to all subscribers, and the team will be notified.
Option B is incorrect because there is no such thing as "related Auto Scaling configuration" in AWS. Option C and D are valid solutions, but they are more complex than Option A. Option C involves creating a CloudWatch event and a Lambda function, which can take time to set up and require coding. Option D requires setting up a CloudWatch alarm and an SNS topic, which is more complicated than configuring the Auto Scaling group to send a notification directly to an SNS topic.
Therefore, the simplest and most straightforward way to notify the team via email whenever an instance fails to terminate is to configure the Auto Scaling group to send a notification to an SNS topic.