Control: Buckets should have lifecycle policies
Description
S3 Buckets should have a lifecycle policy associated for data retention.
Usage
Run the control in your terminal:
powerpipe control run aws_thrifty.control.buckets_with_no_lifecycle
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_thrifty.control.buckets_with_no_lifecycle --share
Steampipe Tables
SQL
select arn as resource, case when lifecycle_rules is null then 'alarm' else 'ok' end as status, case when lifecycle_rules is null then name || ' does not have lifecycle policy.' else name || ' has a lifecycle policy.' end as reason , region, account_idfrom aws_s3_bucket;