Monitoring and Logging

Which setting automatically expires CloudWatch Logs events after 30 days?

Show the answer

Correct answerB. A log group's retention setting

AWhy not this: Subscription filters forward matching log events; they do not control source retention.

BWhy this is right: The log group's retention setting defines how long CloudWatch Logs retains its events.

CWhy not this: Metric filters generate metrics from matching log events; they do not expire those events.

DWhy not this: S3 lifecycle rules expire S3 objects, not events held in CloudWatch Logs.

A CloudWatch Logs log group's retention setting controls when its events expire. S3 lifecycle rules manage objects in S3, not events stored in CloudWatch Logs.