QuestionQ2

Continuous Improvement for Existing Solutions

A company needs to run a custom network-analysis software package to inspect traffic as it enters and leaves a VPC. The company deployed the solution with AWS CloudFormation on three Amazon EC2 instances in an Auto Scaling group. All network routes are configured to direct traffic to the EC2 instances.

Whenever the analysis software ceases to work, the Auto Scaling group replaces an instance. The network routes are not updated when an instance is replaced.

Which combination of steps will resolve this problem?

Choose 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.
Explanation

The Amazon CloudWatch agent's procstat plugin collects metrics for individual application processes, allowing an alarm to detect analysis-software failure. CloudWatch alarms can publish to an Amazon SNS topic, which can invoke a Lambda-driven remediation workflow. The function can remove the failed instance from service so the Auto Scaling group maintains capacity by launching a replacement, and it can update the VPC routes to target that replacement. EC2 status checks monitor instance-level health rather than the custom application process, Systems Manager Agent is not the appropriate process-metrics mechanism, and CloudFormation conditions do not perform runtime route updates for Auto Scaling replacements.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!