Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudwatch_log_group_retention_policy_specific_days_enabledProvider: AWS
Service:
cloudwatchSeverity: MEDIUM
Categories:
logging, forensics-readyResource type:
AwsLogsLogGroupWhat this check verifies
CloudWatch Log Groups are assessed for a retention period at or above the configured threshold (e.g.,365 days) or for being set to never expire. Log groups with shorter retention are identified.
Risk
Short log retention erodes audit evidence. Adversaries can wait out the window, creating gaps in detection, forensics, and compliance reporting. This degrades the availability of historical logs and the integrity of incident timelines.Recommendation
Define a minimum retention baseline (e.g.,>=365 days) aligned to legal and investigative needs. Apply it consistently with documented exceptions. Automate enforcement, monitor changes, and restrict who can modify retention under least privilege and defense in depth.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws logs put-retention-policy —log-group-name <LOG_GROUP_NAME> —retention-in-days <DAYS>
References
- https://trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/CloudWatchLogs/cloudwatch-logs-retention-period.html
- https://boto3.amazonaws.com/v1/documentation/api/1.26.93/reference/services/logs/client/put_retention_policy.html
- https://medium.com/pareture/aws-cloudwatch-log-group-retention-periods-bb8a2fb9c358
- https://www.blinkops.com/blog/cloudwatch-retention
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Logs.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = cloudwatch_log_group_retention_policy_specific_days_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks