turbot/steampipe-mod-aws-compliance

Control: EBS volumes should be protected by a backup plan

Description

Ensure that AWS Elastic Block Store (AWS EBS) volumes are protected by a backup plan. The rule is non-compliant if the AWS EBS volume is not covered by a backup plan.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.ebs_volume_protected_by_backup_plan

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

with backup_protected_volume as (
select
resource_arn as arn
from
aws_backup_protected_resource as b
where
resource_type = 'EBS'
)
select
v.arn as resource,
case
when b.arn is not null then 'ok'
else 'alarm'
end as status,
case
when b.arn is not null then v.title || ' is protected by backup plan.'
else v.title || ' is not protected by backup plan.'
end as reason
, v.region, v.account_id
from
aws_ebs_volume as v
left join backup_protected_volume as b on v.arn = b.arn;

Tags