turbot/aws_insights

Query: ec2_instance_security_groups

Usage

powerpipe query aws_insights.query.ec2_instance_security_groups

Steampipe Tables

SQL

select
p ->> 'GroupId' as "Group ID",
p ->> 'GroupName' as "Group Name"
from
aws_ec2_instance,
jsonb_array_elements(security_groups) as p
where
region = split_part($1, ':', 4)
and account_id = split_part($1, ':', 5)
and arn = $1;

Dashboards

The query is used in the dashboards: