Q61 — AWS DVA-C02 Ch.1

Question 61 of 100 | ← Chapter 1

A developer wants to search and filter log data to debug an application. Application logs are stored in Amazon CloudWatch Logs. The developer created a new metric filter to count exceptions in application logs. However, no results are returned from the filter. What is the reason no filter results are returned?

Correct Answer: B. CloudWatch Logs only publishes metric data for events occurring after the filter is created.

Explanation

Amazon CloudWatch Logs metric filters generate metric data based on log events. This means metric filters process and generate metrics only for log events that occur after the filter is created. If the filter is created after relevant log events have already occurred, those earlier events will not be included in the metric data — resulting in empty filter output. Thus, the correct answer is B.