turbot/steampipe-mod-aws-insights

Dashboard: AWS EC2 Instance Detail

This dashboard answers the following questions for each instance:

  • How is the instance configured?
  • What tags are applied?
  • Which block devices, security groups and network interfaces is it attached to?
  • How many CPU cores are present on each instance?
  • What relationships does the instance have with other resources?
This dashboard contains 5 cards, 1 graph, 1 input and 6 tables.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-aws-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select AWS EC2 Instance Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run aws_insights.dashboard.ec2_instance_detail --share

Queries

This dashboard uses the the following queries:
with volume_details as (
select
p -> 'Ebs' ->> 'VolumeId' as "Volume ID",
p ->> 'DeviceName' as "Device Name",
p -> 'Ebs' ->> 'AttachTime' as "Attach Time",
p -> 'Ebs' ->> 'DeleteOnTermination' as "Delete On Termination",
p -> 'Ebs' ->> 'Status' as "Status",
arn
from
aws_ec2_instance,
jsonb_array_elements(block_device_mappings) as p
where
arn = $1
)
select
"Volume ID",
"Device Name",
"Attach Time",
"Delete On Termination",
"Status",
v.arn as "Volume ARN"
from
volume_details as vd
left join aws_ebs_volume v on v.volume_id = vd."Volume ID"
where
v.volume_id in (select "Volume ID" from volume_details)

Tags