Check provider logo

Kinesis stream retains data for at least the required minimum hours

kinesis_stream_data_retention_period

Severitymedium
Servicekinesis
by Prowler

Kinesis Data Streams retention window is evaluated to confirm records are kept for at least the configured minimum duration (default 168 hours).

Risk

Insufficient retention causes records to expire before consumers read or reprocess them, undermining availability and analytics integrity. Backlogs or outages can create irreversible data gaps, hinder investigations and recovery, and enable denial-of-service-by-lag against event pipelines.

Run this check with Prowler CLI

prowler aws --checks kinesis_stream_data_retention_period

Recommendation

Set the retention period to exceed worst-case consumer lag, replay needs, and compliance windows; use at least 168 hours by default (or customize as necessary) and raise as required. Enforce change control and least privilege on retention changes, monitor consumer lag, and maintain secondary durability (e.g., archival) for critical streams.

Remediation

CLI

aws kinesis increase-stream-retention-period --stream-name <example_resource_name> --retention-period-hours 168

Native IaC
Terraform
Other
  1. Sign in to the AWS Console and open Amazon Kinesis
  2. Go to Data streams and select <example_resource_name>
  3. Click Edit
  4. Set Retention period to 168 hours (or higher, per your policy)
  5. Click Save changes

Source Code

Resource Type

AwsKinesisStream

References