I'm migrating my static website from one AWS account to another. I want to have zero downtime and decided to pull up the whole infrastructure on the second, then just switch the domain name's DNS records to the new hosted zone. The only problem I'm facing now is that I can't assign my domain name (mydomain.com) to the second CloudFront distribution as an alias and I get the error CNAMEAlreadyExists
. I've contacted AWS support but they told me I need a premium support plan to do this with their help... Basically one domain name can only be associated with a single CloudFront distribution globally at a time.
How could I do the migration between accounts without having to turn off the first distribution and enable the second, resulting in downtime?