AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 341

A company has an application that uploads access logs to an Amazon CloudWatch Logs log group. The fields in the log lines include the response code and the application name.

The company wants to create a CloudWatch metric to track the number of requests by response code in a specific range and with a specific application name.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

CloudWatch Logs metric filters are applied at the log group level, allowing you to scan log events for specific patterns and publish custom metrics with dimensions. Option A is incorrect because metric filters cannot be configured directly on individual log streams. Options C and D are incorrect because neither Contributor Insights nor Logs Insights queries are used to automatically increment and output standard CloudWatch metrics with custom dimensions from incoming logs.