turbot/aws_insights

Query: ec2_network_load_balancers_for_s3_bucket

Usage

powerpipe query aws_insights.query.ec2_network_load_balancers_for_s3_bucket

SQL

select
nlb.arn as nlb_arn
from
aws_ec2_network_load_balancer as nlb,
jsonb_array_elements(nlb.load_balancer_attributes) as attributes,
aws_s3_bucket as b
where
b.arn = $1
and attributes ->> 'Key' = 'access_logs.s3.bucket'
and attributes ->> 'Value' = b.name;