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):
aws rds modify-db-instance \
--db-instance-identifier {{db-instance-id}} \
--db-instance-class {{new-instance-class}} \
--apply-immediately false
To apply immediately (causes a brief outage while resizing):
aws rds modify-db-instance \
--db-instance-identifier {{db-instance-id}} \
--db-instance-class {{new-instance-class}} \
--apply-immediately true