ExitLog Retention: configuring how long logs remain available1 / 9
Explanation

Set retention on the CloudWatch Logs log group

How CloudWatch Logs retention settings and lifecycle rules for CloudTrail logs in S3 preserve the required workload history without keeping records indefinitely. · associate

Log retention defines how long records remain available. Choose the duration from troubleshooting, investigation, and contractual requirements—not one default for every workload. Also decide how quickly older records must be retrieved. Collecting logs and retaining them are separate tasks.

In CloudWatch Logs, retention is configured for each log group and applies to all its log streams. Newly created log groups retain events indefinitely by default unless a retention policy is set. In the CloudWatch console, open the intended log group, edit its retention setting, choose a supported period, and save it.

Expiration uses the log event timestamp, not the time you changed the setting. Shortening retention can therefore make existing events eligible for deletion. Deletion is asynchronous, so do not expect expired records to disappear immediately. Increasing retention later cannot recover records already deleted.