SOA-C03 · Question #73
A CloudOps engineer needs to set up alerting and remediation for a web application. The application consists of Amazon EC2 instances that have AWS Systems Manager Agent (SSM Agent) installed. Each…
The correct answer is A. Install the Amazon CloudWatch agent on the EC2 instances. C. Create an Amazon CloudWatch metric filter for the web logs. Configure an alarm for the specific E. Create an Amazon EventBridge rule that responds to the alarm. Configure the rule to invoke an. This question tests the ability to design an automated log monitoring and remediation pipeline on AWS using CloudWatch, EventBridge, and Systems Manager for EC2 instances.
Question
A CloudOps engineer needs to set up alerting and remediation for a web application. The application consists of Amazon EC2 instances that have AWS Systems Manager Agent (SSM Agent) installed. Each EC2 instance runs a custom web server. The EC2 instances run behind a load balancer and write logs locally. The CloudOps engineer must implement a solution that restarts the web server software automatically if specific web errors are detected in the logs. Which combination of steps will meet these requirements? (Select THREE.)
Options
- AInstall the Amazon CloudWatch agent on the EC2 instances.
- BCreate an AWS CloudTrail metric filter for the web logs. Configure an alarm for the specific errors.
- CCreate an Amazon CloudWatch metric filter for the web logs. Configure an alarm for the specific
- DPublish alarm findings to Amazon Simple Email Service (Amazon SES). Invoke an AWS Lambda
- ECreate an Amazon EventBridge rule that responds to the alarm. Configure the rule to invoke an
- FCreate an Amazon Simple Notification Service (Amazon SNS) notification that responds to the
How the community answered
(34 responses)- A74% (25)
- B9% (3)
- D15% (5)
- F3% (1)
Why each option
This question tests the ability to design an automated log monitoring and remediation pipeline on AWS using CloudWatch, EventBridge, and Systems Manager for EC2 instances.
The Amazon CloudWatch agent must be installed on EC2 instances to collect and stream local application/web server logs to CloudWatch Logs, since EC2 instances do not natively send logs to CloudWatch without this agent.
AWS CloudTrail records API call activity across AWS services, not application-level or web server log data written locally on EC2 instances, so it cannot be used to create metric filters on custom web logs.
A CloudWatch Logs metric filter is the correct mechanism to parse log data ingested into CloudWatch Logs and create a custom metric based on specific error patterns; a CloudWatch alarm on that metric then triggers automated actions when thresholds are breached.
Amazon SES is an email sending service and does not provide a native mechanism to trigger Systems Manager remediation actions; invoking Lambda adds unnecessary complexity compared to the direct EventBridge-to-SSM Run Command integration.
An Amazon EventBridge rule can be configured to respond to a CloudWatch alarm state change, and the rule target can be an AWS Systems Manager Run Command document that restarts the web server on the affected EC2 instances, enabling fully automated remediation.
Amazon SNS can send notifications but cannot directly execute remediation actions such as restarting a web server; SNS lacks the ability to invoke SSM Run Command on EC2 instances, making it insufficient as the sole remediation trigger compared to EventBridge targeting SSM.
Concept tested: Automated log-based alerting and remediation using CloudWatch and SSM
Source: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html
Topics
Community Discussion
No community discussion yet for this question.