Monitoring and Logging

An application writes JSON events to CloudWatch Logs. An operations team needs custom analysis of incoming events within seconds, without repeatedly querying stored logs; which solution should the engineer implement?

Show the answer

Correct answerC. Configure a subscription filter that invokes a Lambda function.

AWhy not this: Scheduled queries repeatedly scan stored events instead of providing event-driven delivery.

BWhy not this: A refreshing query widget displays query results but does not deliver events to custom processing logic.

CWhy this is right: A subscription filter delivers matching incoming events to Lambda for custom near-real-time analysis.

DWhy not this: S3 exports support batch analysis and are not suitable for processing incoming events within seconds.

A CloudWatch Logs subscription filter delivers matching incoming log events to a destination such as Lambda for near-real-time processing. Logs Insights queries analyze stored events rather than continuously delivering new events to custom processing logic.