Ensure that your Amazon CloudWatch Logs log groups have a retention period of at least 1 year. The retention period feature must be configured to establish how long log events are kept in Amazon CloudWatch Logs. Just like metric filters, retention settings are assigned to log groups and the retention period assigned to a log group is applied to their log streams as well.
optimisation
efficiency
excellence
Amazon CloudWatch Logs bring together logs from your various systems, applications, and AWS services into one incredibly scalable service. Amazon CloudWatch Logs provides the capability to oversee, retain, and retrieve your log files sources like Amazon EC2 instances, CloudTrail, Route 53, and more. Maintaining log records for a minimum of 1 year can be advantageous in adhering to log retention regulations. Also, if the retention period for a log group is not configured, the log data will be retained indefinitely.
Audit
To determine if your CloudWatch Logs log groups have a retention period of at least 1 year, perform the following actions:
Remediation / Resolution
To configure the optimal log retention period for your Amazon CloudWatch Logs log groups, perform the following actions:
References
- AWS Documentation
- What is Amazon CloudWatch Logs?
- Amazon CloudWatch Logs concepts
- Working with log groups and log streams
- AWS Command Line Interface (CLI) Documentation
- describe-log-groups
- put-retention-policy