Scenario:
- An AWS Aurora (Postgres) cluster is currently running, but something is wrong with it.
- To solve this issue, I want to restore a cluster snapshot created some days earlier and reset to that point in time.
- I use CDK for my infrastructure and restore the cluster using the
DatabaseClusterFromSnapshotclass.
Problem: the old cluster and new cluster must carry the exact same cluster identifier. Because AWS deletes the old cluster only after the new cluster is created, this results in a naming conflict.
Is there any feasible way to reach my goal of having the new cluster carrying the exact same name? On our production environment, there is deletion protection so I cannot create a custom resource to delete the cluster before the new one is created.