Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover when a Route53 is missing from my Cloud Formation stack?

This happened to me a couple of times now. A mistake caused the deletion of an entry in Route53, a CNAME in this case, from a Cloud Formation stack (driven by CDK). How do I cause the re-creation of this record? Re-deploying the stack doesn't seem to do it, as Cloud Formation consider it deployed.

I think this is essentially what's called drift?

like image 480
pupeno Avatar asked Nov 16 '25 20:11

pupeno


1 Answers

Fixing this in CF takes two steps buddy.

  1. Cut the CNAME resource from your CloudFormation stack and then apply it. This informs CloudFormation to delete that resource from the stack's managed resources.
  2. Paste the CNAME resource again to the same CloudFormation stack and then apply it. This will force CloudFormation to both add it to its resource list and provision the Route53 CNAME.
like image 76
Allan Chua Avatar answered Nov 18 '25 13:11

Allan Chua



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!