turbot/aws_insights

Query: ec2_instances_for_ec2_classic_load_balancer

Usage

powerpipe query aws_insights.query.ec2_instances_for_ec2_classic_load_balancer

SQL

select
i.arn as instance_arn
from
aws_ec2_classic_load_balancer as clb
cross join jsonb_array_elements(clb.instances) as ci
left join aws_ec2_instance i on i.instance_id = ci ->> 'InstanceId'
where
clb.arn = $1;