CloudWatch log groups should be retained for a specified time period
Confirms that CloudWatch log groups have a retention policy set to at least 365 days.
- service
- CloudWatch
- severity
- Medium
- scope
- evaluated in every region
How to fix it
To comply with this control, set the retention policy of CloudWatch log groups to at least 365 days. This ensures that log data is stored for a sufficient duration to meet compliance and auditing requirements.
- Sign in to the AWS Management Console and open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.
- In the CloudWatch console, click on 'Logs' in the left navigation pane.
- Select the log group for which you want to set the retention policy.
- Click on the name of the log group to view its details.
- In the 'Log group details' section, click on the 'Edit' button next to 'Retention setting'.
- In the 'Edit retention setting' dialog, select a retention period of '365 days (1 year)' or more.
- Click on the 'Save' button to apply the new retention setting.
See which of your accounts this check is failing on.
Book a demo