Amazon Aurora
User Guide for Aurora (API Version 2014-10-31)

Deleting a DB Instance in a DB Cluster

  • Provide the name of the instance

  • Enable or disable the option to take a final DB snapshot of the instance

  • Enable or disable the option to retain automated backups

You can delete a DB instance in a DB cluster, including deleting the primary DB instance in a DB cluster or an Amazon Aurora Replica. To delete a DB instance, you must specify the name of the instance.

You can enable deletion protection so that users can't delete a DB cluster. Deletion protection is enabled by default when you create a production DB cluster using the AWS Management Console. However, deletion protection is disabled by default if you create a cluster using the AWS CLI or API.

Aurora enforces deletion protection whether you delete from the console, the CLI, or the API. If you try to delete a DB cluster that has deletion protection enabled, or if you try to delete the cluster's last DB instance, you can't do so. The exception is if you first modify the cluster and disable deletion protection. For more information, see Modifying the DB Cluster by Using the Console, CLI, and API.

For Aurora MySQL, you can't delete a DB instance in a DB cluster if both of the following conditions are true:

  • The DB cluster is a Read Replica of another Aurora DB cluster.

  • The DB instance is the only instance in the DB cluster.

To delete a DB instance in this case, first promote the DB cluster so it's no longer a Read Replica. After the promotion completes, you can delete the final DB instance in the DB cluster. For more information, see Replicating Amazon Aurora MySQL DB Clusters Across AWS Regions.

Deleting a DB Instance by Using the Console, CLI, and API

You can delete a DB instance using the AWS Management Console, the AWS CLI, or the RDS API.

Console

To delete a DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Instances, and then choose the DB instance that you want to delete.

  3. Choose Instance actions, and then choose Delete.

  4. To retain automated backups, choose Retain automated backups.

  5. Enter delete me in the box.

  6. Choose Delete.

AWS CLI

To delete a DB instance by using the AWS CLI, call the delete-db-instance command and specify the --db-instance-identifier option.

For Linux, OS X, or Unix:

aws rds delete-db-instance \ --db-instance-identifier mydbinstance

For Windows:

aws rds delete-db-instance ^ --db-instance-identifier mydbinstance
RDS API

To delete a DB instance by using the Amazon RDS API, call the DeleteDBInstance action and specify the DBInstanceIdentifier parameter.