turbot/aws_insights

Query: s3_bucket_cross_region_replication

Usage

powerpipe query aws_insights.query.s3_bucket_cross_region_replication

Steampipe Tables

SQL

with bucket_with_replication as (
select
name,
r ->> 'Status' as rep_status
from
aws_s3_bucket,
jsonb_array_elements(replication -> 'Rules' ) as r
)
select
'Cross-Region Replication' as label,
case when b.name = r.name and r.rep_status = 'Enabled' then 'Enabled' else 'Disabled' end as value,
case when b.name = r.name and r.rep_status = 'Enabled' then 'ok' else 'alert' end as type
from
aws_s3_bucket b
left join bucket_with_replication r on b.name = r.name
where
arn = $1;

Dashboards

The query is used in the dashboards: