turbot/aws_insights

Query: ec2_instance_public_access_table

Usage

powerpipe query aws_insights.query.ec2_instance_public_access_table

SQL

select
i.instance_id as "Instance ID",
i.tags ->> 'Name' as "Name",
case when public_ip_address is null then 'Private' else 'Public' end as "Public/Private",
i.public_ip_address as "Public IP Address",
a.title as "Account",
i.account_id as "Account ID",
i.region as "Region",
i.arn as "ARN"
from
aws_ec2_instance as i,
aws_account as a
where
i.account_id = a.account_id
order by
i.instance_id;

Dashboards

The query is used in the dashboards: