turbot/aws_insights

Query: cloudfront_distributions_for_ec2_application_load_balancer

Usage

powerpipe query aws_insights.query.cloudfront_distributions_for_ec2_application_load_balancer

SQL

select
d.arn as distribution_arn
from
aws_cloudfront_distribution as d,
jsonb_array_elements(origins) as origin
left join aws_ec2_application_load_balancer as b on b.dns_name = origin ->> 'DomainName'
where
b.arn = $1;