turbot/aws_insights

Query: s3_buckets_for_lambda_function

Usage

powerpipe query aws_insights.query.s3_buckets_for_lambda_function

Steampipe Tables

SQL

select
arn as bucket_arn
from
aws_s3_bucket,
jsonb_array_elements(event_notification_configuration -> 'LambdaFunctionConfigurations') as t
where
event_notification_configuration -> 'LambdaFunctionConfigurations' <> 'null'
and t ->> 'LambdaFunctionArn' = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4);