Create a Contributor Insights rule for top contributors and alarm on INSIGHT_RULE_METRIC for over half the errors

Answer Correct answer: A, D — use a Contributor Insights rule for top contributors and alarm on INSIGHT_RULE_METRIC.

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.)

  1. Create a CloudWatch Contributor Insights rule that groups logs from the CloudWatch application logs based on instance ID and errors. Correct Answer
  2. Create a resource group in AWS Resource Groups. Use the CloudFormation stack to group the resources for the application. Add the application to CloudWatch Application Insights. Use the resource group to identify the application.
  3. Create a metric filter for the application logs to count the occurrence of the term "Error.'' Create a CloudWatch alarm that uses the METRIC_COUNT function to determine whether errors have occurred. Configure the CloudWatch alarm to send a notification to an Amazon Simple Notification Service (Amazon SNS) topic to notify the DevOps team.
  4. Create a CloudWatch alarm that uses the INSIGHT_RULE_METRIC function to determine whether a specific instance is responsible for more than half of all errors reported by EC2 instances. Configure the CloudWatch alarm to send a notification to an Amazon Simple Notification Service (Amazon SNS) topic to notify the DevOps team. Correct Answer
  5. Create a CloudWatch subscription filter for the application logs that filters for errors and invokes an AWS Lambda function. Configure the Lambda function to send the instance ID and error and in a notification to an Amazon Simple Notification Service (Amazon SNS) topic to notify the DevOps team.

Community Votes

AD
100%

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)

Srikantha 👍 1 Selected: AD
CloudWatch Contributor Insights (A): CloudWatch Contributor Insights can be used to analyze CloudWatch logs and aggregate them by custom dimensions, such as the instance ID in this case. This will allow you to identify which EC2 instance is contributing the most to errors in the application logs, which directly addresses the requirement of identifying if any EC2 instance is responsible for more than half of the errors. CloudWatch Alarm with INSIGHT_RULE_METRIC (D): After creating the Contributor Insights rule to track error patterns and group logs by instance, you can use the INSIGHT_RULE_METRIC function to create a CloudWatch alarm. This metric can monitor the Contributor Insights rule for instances that contribute disproportionately to errors (e.g., more than 50% of all errors). You can configure the CloudWatch alarm to trigger notifications via Amazon SNS, alerting the DevOps team when the threshold is breached.
CHRIS12722222 👍 4 Selected: AD
contributor insight for top N
uncledana 👍 3 Selected: AD
A and D provide a streamlined and automated way to track which EC2 instance is contributing to a high percentage of errors and send an alert when this threshold is crossed, with minimal manual intervention and operational overhead.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 →

← Back to DOP-C02 Study Guide