Remove zombie databases from RDS

0

I have a couple of Aurora database clusters that didn't create properly several years ago, and cannot be deleted using the API or console. They are both MySQL 5.6.10a regional clusters (with no instances) but also can't be upgraded.

They're probably not doing any harm but I'd like to get rid of them anyway, especially as I'm getting frequent messages about compulsory upgrades.

One cluster is in us-east-1, stuck with status "Creating". The other cluster is in ap-southeast-2, and is stuck with status "Incompatible-restore" (whatever we were trying to restore doesn't matter now anyway).

If I attempt to delete them in the console, I get a banner notification "The <name> cluster is being deleted.", but it never does delete.

If I attempt to delete them using the aws cli tool, I get a response with the cluster details, but again, they are not deleted.

aws rds delete-db-cluster --profile develop --region us-east-1 --skip-final-snapshot --db-cluster-identifier develop-globaldb-instance-1-cluster aws rds delete-db-cluster --profile develop --region ap-southeast-2 --skip-final-snapshot --db-cluster-identifier snowflake-cluster

Ideas welcome!

  • What happens if you let the threatened compulsory upgrades happen? Presumably the upgrades will fail, but it may leave each cluster in a known state (even if that's a known bad state) rather than the inconclusive/unknown states they are in now.

  • Hey RWC, I guess we're going to find out!

MC
已提问 1 年前284 查看次数
1 回答
1
已接受的回答

Here are some ideas:

  1. Use the AWS CLI to force delete the clusters. You can use the following command to force delete the clusters:

    aws rds delete-db-cluster --profile develop --region us-east-1 --skip-final-snapshot --db-cluster-identifier develop-globaldb-instance-1-cluster --force
    
    aws rds delete-db-cluster --profile develop --region ap-southeast-2 --skip-final-snapshot --db-cluster-identifier snowflake-cluster --force
    
  2. Use the AWS CloudFormation template to delete the clusters. You can use the following AWS CloudFormation template to delete the clusters:

    {
      "Resources": {
        "DevelopGlobalDbInstance1Cluster": {
          "Type": "AWS::RDS::DBCluster",
          "Properties": {
            "DBClusterIdentifier": "develop-globaldb-instance-1-cluster",
            "Engine": "MySQL",
            "EngineVersion": "5.6.10a",
            "Region": "us-east-1",
            "DeletionPolicy": "ForceDelete"
          }
        },
        "SnowflakeCluster": {
          "Type": "AWS::RDS::DBCluster",
          "Properties": {
            "DBClusterIdentifier": "snowflake-cluster",
            "Engine": "MySQL",
            "EngineVersion": "5.6.10a",
            "Region": "ap-southeast-2",
            "DeletionPolicy": "ForceDelete"
          }
        }
      }
    }
    
  3. Use the AWS API to delete the clusters. You can use the following AWS API call to delete the clusters:

    DELETE /rds/clusters/develop-globaldb-instance-1-cluster
    
    DELETE /rds/clusters/snowflake-cluster
    

    Note: If you are using the AWS API to delete the clusters, you will need to make sure that you have the appropriate permissions.

  4. Contact AWS Support. AWS Support can help you troubleshoot and delete your database clusters.

profile picture
已回答 1 年前
profile picture
专家
已审核 21 天前
  • Hi Marawan, these were great suggestions, thank you! Unfortunately they haven't helped this time.

    1. I can't see the --force option among the delete-db-cluster parameters, and if I try to use it I get an error that it's not supported. aws-cli v2.11.13 so I think I'm up to date (well I was when I tested this yesterday).

    2. This looked promising! Unfortunately the stack creation fails with the message "DB cluster isn't available for modification with status incompatible-restore" (status "creating" for the other cluster). So basically the same result as the cli.

    3. Both the cli and the console are using the API to perform the task, so I'd say that's where the error is generated.

    4. This looks like my next step! Thanks

  • Ended up resolving this through support

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容