Skip to main content

๐Ÿ›ก๏ธ AWS RDS Instance is idle๐ŸŸข

Logicโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

This policy identifies AWS RDS instances that appear to be idle based on their performance metrics over the past 30 days. An instance is considered idle if it meets all of the following criteria:

  1. Average CPU utilization has been less than 5%.
  2. Average Database Connections is zero.

Rationaleโ€‹

Idle RDS instances generate costs without delivering business value. Identifying and decommissioning these resources can significantly reduce monthly AWS spend. Regular cleanup of unused resources also improves operational efficiency and reduces cloud management overhead.

Auditโ€‹

This policy evaluates an RDS Instance based on its 30-day performance metrics.

The Instance is marked as INCOMPLIANT if all the following criteria are met:

  • CloudWatch: CPU, 30-Day metric is less than 5%.
  • CloudWatch: Database Connections, 30-Day metric is zero.

The Instance is marked as INAPPLICABLE if it is not in an available Status or has been running for less than 30 days.

The Instance is marked as UNDETERMINED if any of the evaluated metrics are empty, indicating insufficient data in the CMDB to assess whether the instance is idle.

Remediationโ€‹

Open File

Remediationโ€‹

Decommission Idle RDS Instancesโ€‹

Key Considerationsโ€‹
  • If deletion is not an option (e.g., business constraints), consider downsizing the instance.
  • Confirm with application and database owners that the instance is no longer required before stopping or deleting it.
  • Stopping an instance retains the underlying data and allows it to be restarted later.
  • Deleting an instance permanently removes it. Always take a final snapshot (if needed) before deletion.
Stop or Delete the Instanceโ€‹
From Command Lineโ€‹

Stop the instance:

aws rds stop-db-instance \
--db-instance-identifier {{db-instance-id}}

Take a final snapshot before deletion:

aws rds create-db-snapshot \
--db-snapshot-identifier {{final-snapshot-name}} \
--db-instance-identifier {{db-instance-id}}

Delete the idle instance:

aws rds delete-db-instance \
--db-instance-identifier {{db-instance-id}} \
--skip-final-snapshot
Downsize the DB instanceโ€‹
From Command Lineโ€‹

To apply during the next maintenance window (recommended for production):

... see more

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Waste Reduction28no data
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Workload Efficiency24no data