Q88 — AWS DOP-C02 Ch.3
Question 88 of 100 | ← Chapter 3
A Software-as-a-Service (SaaS) company deploys its primary .NET application using AWS Elastic Beanstalk. The Elastic Beanstalk environment is configured to use Amazon EC2 Auto Scaling and Elastic Load Balancing (ELB) for underlying EC2 instances. The company experienced incidents where EC2 instances were marked unhealthy and terminated by the Auto Scaling group after failing ELB health checks. The DevOps team wants to build a solution that notifies the operations team whenever the Auto Scaling group terminates any EC2 instance in the production environment.
- A. Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe email addresses of all operations team members to the SNS topic. Configure notifications for the `autoscaling:EC2_INSTANCE_LAUNCH` notification type on all existing Auto Scaling groups.
- B. Create an Amazon Simple Queue Service (Amazon SQS) queue. Add an AWS Lambda function trigger to the SQS queue. Configure notifications for the `autoscaling:EC2_INSTANCE_LAUNCH` notification type on all existing Auto Scaling groups.
- C. Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe email addresses of all operations team members to the SNS topic. Configure notifications for the `autoscaling:EC2_INSTANCE_TERMINATE` notification type on all existing Auto Scaling groups. ✓
- D. Create an Amazon Simple Queue Service (Amazon SQS) queue. Add an AWS Lambda function trigger to the SQS queue. Configure notifications for the `autoscaling:EC2_INSTANCE_TERMINATE` notification type on all existing Auto Scaling groups.
Correct Answer: C. Create an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe email addresses of all operations team members to the SNS topic. Configure notifications for the `autoscaling:EC2_INSTANCE_TERMINATE` notification type on all existing Auto Scaling groups.
Explanation
The requirement is to notify the operations team when EC2 instances are terminated—not launched. The `autoscaling:EC2_INSTANCE_TERMINATE` notification type specifically signals termination events. Option C directly delivers termination notifications via SNS to subscribed email addresses, providing immediate, simple, and reliable alerting. Options A and B use `EC2_INSTANCE_LAUNCH`, which is irrelevant to termination events. Option D unnecessarily adds SQS and Lambda complexity when direct SNS delivery suffices for email notifications.