turbot/steampipe-mod-aws-compliance

Control: EBS volumes should be attached to EC2 instances

Description

Checks if EBS volumes are attached to EC2 instances.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.ebs_volume_unused

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.ebs_volume_unused --share

SQL

This control uses a named query:

select
arn as resource,
case
when state = 'in-use' then 'ok'
else 'alarm'
end as status,
case
when state = 'in-use' then title || ' attached to EC2 instance.'
else title || ' not attached to EC2 instance.'
end as reason
, region, account_id
from
aws_ebs_volume;

Tags