Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

How to delete an Aurora Cluster

03 April,2024 by Rambler

There isn't a one step process to delete an  AWS Aurora DB Cluster . AWS states this is an intentional design decision as Aurora is typically used for applications requiring High Availability.

These are the nomal steps to delete an Aurora Cluster - customize according to the specific details of the setup

Strongly recommend you take a backup before completing these steps. 

 Before we proceeed with the delete steps , you'll need to assess whether the Aurora Cluster is part of a Global Cluster . 

--get details of the Global Cluster

aws rds describe-global-clusters --global-cluster-identifier myGlobalCluster

--Get the Global Aurora Cluster members

aws rds describe-global-clusters --global-cluster-identifier mysql-liqbase-global --query "GlobalClusters[*].{ID:GlobalClusterMembers[*].[DBClusterArn,IsWriter]}"

--Remove the Cluster from the Global Cluster. You'll need to remove the Secondary Cluster first 

aws rds --region secondary_region remove-from-global-cluster --db-cluster-identifier secondary_cluster_ARN --global-cluster-identifier global_database_id 

 

Once you've detached the Cluster from the Global Database and If you attempt to delete the Aurora Cluster - you may get an error message 

Be sure to delete all instances associated with the cluster before you delete the cluster.

Progress with deleting the Reader and then Writer Instances from the Cluster. Once they are deleted successfully -  progress with the Cluster delete step with a skeletal command line in Step 3 

 

Step 1 : Delete the Reader Instances 

aws rds delete-db-instance --db-instance-identifier <REPLACE_WITH_RDS_IDENTIFIER> --final-db-snapshot-identifier <REPLACE_WITH_RDS_FINAL_SNAP_NAME> 

Step 2 : Delete the Writer Instances

aws rds delete-db-instance --db-instance-identifier <REPLACE_WITH_RDS_IDENTIFIER> --final-db-snapshot-identifier <REPLACE_WITH_RDS_FINAL_SNAP_NAME> 

Step 3 : Delete the DB Cluster

aws rds delete-db-cluster --db-cluster-identifier <REPLACE_WITH_CLUSTER_NAME> --no-skip-final-snapshot --final-db-snapshot-identifier <REPLACE_WITH_CLUSTER_NAME_FINAL-SNAPSHOT_NAME>

 

For more AWS CLI commands reference AWS CLI Cheatsheet - RDS, AWS Backup , DMS, IAM, Security Token Service,KMS,EC2, DynamoDB,VPC,Aurora, Aurora Global,RESOURCEGROUPSTAGGINGAPI,DocumentDB,CloudTrail


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to delete an Aurora Cluster


dba-ninja.com