Kinesis streams should have an adequate data retention period
Checks that Kinesis data streams keep records for at least 168 hours (7 days), the default of AWS's control, so consumers that fall behind or fail have time to recover before records expire. A stream keeps records for 24 hours unless its retention period is raised, up to 8760 hours.
- service
- Kinesis
- severity
- Medium
- scope
- evaluated in every region
How to fix it
In the console
Kinesis → Data streams → the stream → Configuration → Data retention period
- Data retention period
- 168 hours (7 days) or more, up to 8760; retention above 24 hours is billed
With the AWS CLI
aws kinesis increase-stream-retention-period --stream-name <stream-name> --retention-period-hours 168 --region <region>With Terraform
resource "aws_kinesis_stream" "this" {
name = var.stream_name
retention_period = 168
}
See which of your accounts this check is failing on.
Book a live scan