turbot/aws_insights

Query: s3_buckets_for_emr_cluster

Usage

powerpipe query aws_insights.query.s3_buckets_for_emr_cluster

SQL

select
b.arn as s3_bucket_arn
from
aws_emr_cluster as c
left join
aws_s3_bucket as b
on split_part(log_uri, '/', 3) = b.name
where
log_uri is not null
and cluster_arn = $1
and c.account_id = split_part($1, ':', 5)
and c.region = split_part($1, ':', 4);