3

I'm trying to make a seamless transition from Heroku to AWS. Currently, DNS is being handled by Route53, with a CNAME record sending traffic to the heroku SSL subdomain. I need to change this to an A Alias record, pointing to the new Elastic Load Balancer with no service disruption.

If the initial record were an A record, then it would simply be a matter of creating the Alias A record, and then removing the original, so that there would always be an active A record for the given subdomain at all times. However, CNAMEs prevent any other records from being created for the same subdomain, with the following message:

<Error><Type>Sender</Type>
<Code>InvalidChangeBatch</Code>
<Message>RRSet of type A with DNS name www.example.com. is not permitted because a conflicting RRSet of type  CNAME with the same DNS name already exists in zone example.com.</Message></Error>

If I remove the CNAME record before creating the A record, then there will be a window during which expired TTLs will fail to resolve the site. How can I avoid this downtime?

jeffatrackaid
  • 4,112
  • 18
  • 22
Dan Fried
  • 90
  • 7
  • 3
    This is more of a issue with Route53 than DNS itself. You may want to use a test domain to see if you can commit 2 changes at once. The deletion of the CNAME and then addition of the A record. – jeffatrackaid May 28 '13 at 17:53

1 Answers1

3

It appears you're using the ChangeResourceRecordSets API call. Just send both changes at the same time: a CREATE for the A record and a DELETE for the CNAME record.

If this doesn't work, yell at Amazon until they fix it.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940