SOA-C02 · Question #684
A SysOps administrator 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…
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. Install the CloudWatch agent on the EC2 instances. You need the CloudWatch agent to collect the custom web server logs from the instance and ship them into CloudWatch Logs. Create an Amazon CloudWatch metric filter for the web logs and configure an alarm for the specific…
Question
A SysOps administrator 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 SysOps administrator 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? (Choose 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
(39 responses)- A74% (29)
- B8% (3)
- D13% (5)
- F5% (2)
Explanation
Install the CloudWatch agent on the EC2 instances. You need the CloudWatch agent to collect the custom web server logs from the instance and ship them into CloudWatch Logs. Create an Amazon CloudWatch metric filter for the web logs and configure an alarm for the specific errors. Define a metric filter on the log group that looks for your error patterns (for example, HTTP 5xx responses). Then set up a CloudWatch Alarm on that filter so it goes into ALARM state whenever the error count exceeds your threshold. Create an Amazon EventBridge rule that responds to the alarm and invoke an AWS Systems Manager Automation runbook to restart the web server software. Have EventBridge listen for the CloudWatch Alarm state change event, and target an SSM Automation runbook that uses, for example, the aws:runShellScript action on each instance to restart the web server. This provides a fully managed, auditable remediation path.
Topics
Community Discussion
No community discussion yet for this question.