turbot/aws_insights

Query: s3_buckets_for_dynamodb_table

Usage

powerpipe query aws_insights.query.s3_buckets_for_dynamodb_table

SQL

select
b.arn as bucket_arn
from
aws_s3_bucket as b,
aws_dynamodb_table_export as t
where
b.name = t.s3_bucket
and t.table_arn = $1
and t.region = split_part($1, ':', 4)
and t.account_id = split_part($1, ':', 5);