Create a Contributor Insights rule for top contributors and alarm on INSIGHT_RULE_METRIC for over half the errors
A DevOps team supports an application that runs on a large number of Amazon EC2 instances in an Auto Scaling group. The DevOps team uses AWS CloudFormation to deploy the EC2 instances. The application recently experienced an issue. A single instance returned errors to a large percentage of requests. The EC2 instance responded as healthy to both Amazon EC2 and Elastic Load Balancing health checks. The DevOps team collects application logs in Amazon CloudWatch by using the embedded metric format. The DevOps team needs to receive an alert if any EC2 instance is responsible for more than half of all errors. Which combination of steps will meet these requirements with the LEAST operational overhead? (Choose two.)
Community Votes
100% of anonymous learners picked answer AD. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Contributor Insights is the service designed to answer which contributor is responsible for a disproportionate share of a metric, and it can analyze log data grouped by custom dimensions such as instance ID, which is exactly the question asked (A). The INSIGHT_RULE_METRIC function is the specific alarm function that evaluates a Contributor Insights rule, and it is what makes the more-than-half share measurable (D). Option C's metric filter plus METRIC_COUNT only counts errors in aggregate across all instances, so it cannot attribute the share to any one instance, and option E's subscription filter plus Lambda requires writing code to parse and attribute errors.
The application logs are already in the embedded metric format, which is what makes log data queryable as metrics by dimension. The question is which single instance is responsible for more than half of all errors, which is a top-contributor question rather than a threshold question. A CloudWatch Contributor Insights rule groups the log data by instance ID and errors, and a CloudWatch alarm built on the INSIGHT_RULE_METRIC function evaluates that rule's metric to determine whether one instance accounts for more than half of all errors, notifying the existing SNS topic when it does. Both steps are managed, so no data pipeline has to be built.
Creating a metric filter counting the term Error and an alarm using the METRIC_COUNT function (C) — as CHRIS12722222 noted, Contributor Insights is the feature for finding the top N contributors, and METRIC_COUNT on a metric filter yields only the total number of error occurrences across the fleet, with no dimension identifying which instance produced them, so it cannot answer whether one instance is responsible for more than half of the errors. Using a subscription filter that invokes a Lambda function to report the instance ID and error (E) — this requires developing, deploying, and maintaining a function that parses and attributes every error record, which is considerably more operational overhead than the managed Contributor Insights rule. Creating a resource group and adding the application to CloudWatch Application Insights (B) — Application Insights provides health and performance monitoring for the application as a whole and does not provide the top-contributor attribution the requirement specifies.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The requirement is to be alerted when any single EC2 instance is responsible for more than half of all errors, and the logs are already collected in the embedded metric format, which is what allows log events to be treated as metrics with dimensions. This is a top-contributor question, and Amazon CloudWatch Contributor Insights is the feature built to answer exactly that, as CHRIS12722222 noted by referring to it as the mechanism for the top N. Creating a Contributor Insights rule that groups the application logs by instance ID and errors produces a metric set describing each contributor's share (A). A CloudWatch alarm that uses the INSIGHT_RULE_METRIC function then evaluates that rule's metric to determine whether a specific instance is responsible for more than half of all errors, and it notifies the existing SNS topic when the condition is met (D). Because both the analysis and the threshold evaluation are performed by managed services using data already collected, no pipeline, script, or function has to be built, which is what the least-operational-overhead requirement asks for. uncledana described A and D as a streamlined, automated way to track which instance contributes a high percentage of errors and alert when the threshold is crossed, with minimal manual intervention. A and D are the correct combination.Why the Other Options Are Wrong
C creates a metric filter counting the occurrence of the term Error and a CloudWatch alarm using the METRIC_COUNT function. A metric filter produces a single aggregate metric containing the total count of matching log events, with no dimension identifying which instance produced them; METRIC_COUNT on that metric therefore tells the team only that errors occurred, not whether one instance accounts for more than half of them. This cannot answer the attribution question, and CHRIS12722222 identified Contributor Insights as the feature that provides top-N attribution. E creates a CloudWatch Logs subscription filter that filters for errors and invokes an AWS Lambda function, with the function sending the instance ID and error to an SNS topic. This requires developing, deploying, and maintaining a function that parses and attributes every error record, which is substantially more operational overhead than a managed Contributor Insights rule and contradicts the least-overhead requirement. B creates a resource group in AWS Resource Groups, uses CloudFormation to group the application's resources, and adds the application to CloudWatch Application Insights to identify the application. Application Insights delivers application health, performance, and availability monitoring for the application as a whole; it does not provide per-contributor attribution of error volume, which is what the requirement asks for. A and D are correct.Community Comment Notes
Community voted A,D unanimously. Srikantha explained that CloudWatch Contributor Insights can analyze CloudWatch logs and aggregate them by custom dimensions such as instance ID, which addresses the attribution question. CHRIS12722222 identified the key point in two words, contributor insight for top N, which is what makes option A the correct analysis step and rules out the aggregate-only metric filter in C. uncledana described A and D as providing a streamlined and automated way to track which instance is contributing a high percentage of errors and to alert when the threshold is crossed, with minimal manual intervention. No alternative received support.Official Reference
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →