turbot/aws_insights

Query: s3_buckets_for_sns_topic

Usage

powerpipe query aws_insights.query.s3_buckets_for_sns_topic

Steampipe Tables

SQL

select
b.arn as bucket_arn
from
aws_s3_bucket as b,
jsonb_array_elements(
case jsonb_typeof(event_notification_configuration -> 'TopicConfigurations')
when 'array' then (event_notification_configuration -> 'TopicConfigurations')
else null end
)
as t
where
t ->> 'TopicArn' = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4);