turbot/steampipe-mod-aws-compliance

Control: RDS DB instance should be protected by backup plan

Description

Ensure that AWS Relational Database Service (AWS RDS) instances are protected by a backup plan. The rule is non-compliant if the AWS RDS Database instance is not covered by a backup plan.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.rds_db_instance_protected_by_backup_plan

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

with backup_protected_rds_isntance as (
select
resource_arn as arn
from
aws_backup_protected_resource as b
where
resource_type = 'RDS'
)
select
r.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 r.title || ' is protected by backup plan.'
else r.title || ' is not protected by backup plan.'
end as reason
, r.region, r.account_id
from
aws_rds_db_instance as r
left join backup_protected_rds_isntance as b on r.arn = b.arn;

Tags