Q75 — AWS SAP-C02 Ch.2
Question 75 of 75 | ← Chapter 2
Q225. A company wants to run a custom network analysis software package to inspect traffic as traffic leaves and enters a VPC. The company has deployed the solution by using AWS CloudFormation on three Amazon EC2 instances in an Auto Scaling group All network routing has been established to direct traffic to the EC2 instances Whenever the analysis software stops working., the Auto Scaling group replaces an instance. The network routes are not updated when the instance replacement occurs Which combination of steps will resolve this issue? (Select THREE.)
- A. Create alarms based on EC2 status check metrics that will cause the Auto Scaling group to replace the failed instance
- B. Update the CloudFormation template to install the Amazon CloudWatch agent on the EC2 instances. Configure the CloudWatch agent to send process metrics for the application. ✓
- C. Update the CloudFormation template to install AWS Systems Manager Agent on the EC2 instances. Configure Systems Manager Agent to send process metrics for the application
- D. Create an alarm for the custom metric in Amazon CloudWatch for the failure scenarios. Configure the alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic ✓
- E. Create an AWS Lambda function that responds to the Amazon Simple Notification Service (Amazon SNS) message to take the instance out of service Update the network routes to point to the replacement instance ✓
- F. In the CloudFormation template, write a condition that updates the network routes when a replacement instance is launched.
Correct Answer: B. Update the CloudFormation template to install the Amazon CloudWatch agent on the EC2 instances. Configure the CloudWatch agent to send process metrics for the application., D. Create an alarm for the custom metric in Amazon CloudWatch for the failure scenarios. Configure the alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic, E. Create an AWS Lambda function that responds to the Amazon Simple Notification Service (Amazon SNS) message to take the instance out of service Update the network routes to point to the replacement instance
Explanation
Option A suggests creating alarms based on EC2 status check metrics that will cause the Auto Scaling group to replace the failed instance. Although this approach can help replace the failed instance, it does not address the underlying issue of network routing not being updated. Option C suggests updating the CloudFormation template to install AWS Systems Manager Agent on the EC2 instances and configure Systems Manager Agent to send process metrics for the application. Although this approach can help monitor the application, it does not address the underlying issue of network routing not being updated. Option F suggests writing a condition in the CloudFormation template that updates the network routes when a replacement instance is launched. However, this approach requires modifying the CloudFormation template each time a new instance is launched, which is not efficient. Therefore, options B, D, and E provide the most suitable solution by updating the CloudFormation template to install the Amazon CloudWatch agent on the EC2 instances and configure the CloudWatch agent to send process metrics for the application, creating an alarm for the custom metric in Amazon CloudWatch for the failure scenarios, configuring the alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic, creating an AWS Lambda function that responds to the Amazon SNS message to take the instance out of service and update the network routes to point to the replacement instance. This approach helps monitor the application, replace failed instances, and update network routing in real-time, ensuring continuous availability of the analysis software package.