Q18 — AWS DOP-C02 Ch.1

Question 18 of 100 | ← Chapter 1

A company runs an application on Amazon EC2 instances. A DevOps engineer needs to aggregate application logs into a centralized system for the application support team to search. Severe error messages appear periodically in the log files. When these errors occur, the DevOps engineer must notify the application support team via email.

Correct Answer: A. Configure the unified Amazon CloudWatch agent on the EC2 instances to publish application log files to a CloudWatch Logs log group. Configure metric filters on the CloudWatch Logs log group to detect severe errors and create custom metrics. Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure a CloudWatch alarm to notify the SNS topic using the custom metric. Subscribe the application team's email address to the SNS topic.

Explanation

Option A is the most operationally efficient solution. It uses only CloudWatch Logs, metric filters, CloudWatch Alarms, and Amazon SNS — fully managed, low-overhead services with native integration. Option D introduces Amazon OpenSearch Service, which adds operational complexity, cost, and maintenance overhead without providing additional value for simple error detection and email notification. Options B and C introduce unnecessary components (Kinesis, X-Ray, ADOT) that overcomplicate the architecture for this use case.