Skip to content

How do I delete Amazon RDS resources?

3 minute read
1

I want to delete the Amazon Relational Database Service (Amazon RDS) resources that are associated with my AWS account so that I don't continue to incur charges.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

List all resources that incur charges and delete them

To get a list of active resources that incur charges in your account, run the following commands for each AWS Region that your resources are in. In each command, replace your_region with your Region.

DB instances and snapshots

To get a list of all RDS database (DB) instances in a specific Region, run the following describe-db-instances command:

aws rds describe-db-instances --region your_region

In the preceding command's output, review the DBInstanceIdentifier and DeletionProtection fields.

Before you delete DB instances, you must first modify the instances to turn off deletion protection. Then, delete the DB instance.

To get a list of all manual RDS DB instance snapshots in a specific Region, run the following describe-db-snapshots command:

aws rds describe-db-snapshots --snapshot-type manual --region your_region

In the preceding command's output, review the DBSnapshotIdentifier field. To delete the DB snapshots, see Deleting a DB snapshot.

Aurora DB clusters and snapshots

To get a list of all Amazon Aurora DB clusters in a specific Region, run the following describe-db-clusters command:

aws rds describe-db-clusters --region your_region

In the preceding command's output, review the DBClusterIdentifier and DeletionProtection fields.

Before you delete DB clusters, you must first modify the cluster to turn off deletion protection. Then, delete the DB cluster. For more information, see How do I troubleshoot issues when I try to delete an Aurora DB cluster?

To get a list of all manual Aurora cluster snapshots in a specific Region, run the following describe-db-cluster-snapshots command:

aws rds describe-db-cluster-snapshots --snapshot-type manual --region your_region

In the preceding command's output, review the DBSnapshotIdentifier field. To delete the cluster snapshots, see Deleting a DB cluster snapshot.

Check for automated backups

When you delete a DB instance, Amazon RDS keeps the instance's automated backups for the retention period that you configured. Automated backups continue to incur storage charges until they expire or you manually delete them.

To get list of automated backups, run the following describe-db-instance-automated-backups command:

aws rds describe-db-instance-automated-backups

To manually delete an automated backup before it expires, run the following delete-db-instance-automated-backup command:

aws rds delete-db-instance-automated-backup --dbi-resource-id resource-id

Note: Replace resource-id with your DB instance's resource ID.

Further troubleshoot

If you still incur charges for your RDS and Aurora resources after you delete them, then take the following actions:

  • Make sure that you checked all Regions that you use for resources.

  • Confirm that you deleted all automated backups.

  • Use AWS Cost Explorer on the AWS Billing and Management Console to review items that you tagged with "Amazon RDS".

  • If you purchased reserved DB instances, then run the following describe-reserved-db-instances command to list all active reserved DB instances and their remaining term:

    aws rds describe-reserved-db-instances

    Note: You can delete a reserved DB instance. However, you continue to incur charges for reserved DB instance until its term expires.

Related information

Amazon RDS pricing