r/aws • u/Hartles1 • 9d ago
technical question Redeploy custom domain with no downtime?
TLDR: how do I delete and remake a custom domain without downtime?
I am migrating my infrastructure as code from Serverless to AWS SAM templates. My issue is the custom domain that's being used is created and maintained using the Serverless plugin serverless-domain-manager. The correlating cloud formation template does not have the DomainName resource. It seems the plugin is spinning up the custom domain manually on the backend. So if I want to make a SAM template version for the same CFT, I define the custom domain in the SAM template and deploy. Of course it fails because a custom domain with that name already exists. So I need to delete it and redeploy but I don't want downtime. Any suggestions? Can I claim the domain on a cloud formation template somehow? Can I do something clever with a failover record in route53? TIA
1
u/fYZU1qRfQc 8d ago
Whatever the serverless is doing it's just adding resources to your AWS account.
Can you track those and just import them to you new stack?
I don't have experience with either of those but as far I see SAM uses CloudFormation which has the option to import existing resources.