title: Transferring white label name servers from one Amazon Web Services account to another
body: <p>I have a domain (call it mydomain.com) registered at one AWS account (call it account A).  The DNS for mydomain.com is also handled by AWS at the same account A: there is a hosted zone in account A for mydomain.com, where the NS records are proprietary (white label) name servers (call them ns1.mydomain.com, ns2.mydomain.com, ns3.mydomain.com, ns4.mydomain.com) set up on aws cli using an AWS reusable delegation set.</p>
  
  <p>I want to transfer registration <em>and</em> the DNS for my domain.com from account A to account B, so that in future the people controlling account B (I am an administrator of both accounts, but the other administrator of account B doesn't control account A) can change the DNS for my domain.com without having to ask me every time.</p>
  
  <p>Transferring registration of a domain between two AWS accounts is simple: AWS has a support <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-between-aws-accounts.html" rel="nofollow noreferrer">document</a> explaining that they will cay out such internal transfers on request if you open a support ticket.</p>
  
  <p>The issue I have is with transferring the hosted zone, and more specifically keeping the same white label name servers as before the transfer.</p>
  
  <p>AWS also provides a support <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html" rel="nofollow noreferrer">document</a> for this topic, where it suggests that if you want to migrate a hosted zone from one AWS account to another, you must can programmatically list the records in the old hosted zone, edit the output, and then programmatically create records in a new hosted zone using the edited output.</p>
  
  <p>While the special case of migrating a hosted zone with white label name servers isn't dealt with specifically in the document, I'm assuming the solution, since reusable delegation sets can't be migrated from one AWS account to another, is to (1) recreate a new reusable delegation set in account B, (2) using the ID in that reusable delegation set, programmatically create a hosted zone for mydomain.com in account B, and (3) create glue records connecting ns1.mydomain.com, ns2.mydomain.com, ns3.mydomain.com, ns4.mydomain.com.</p>
  
  <p>That would suffice to make the DNS for mydomain.com to work without any interruption being caused by the transfer.  My problem is I don't know what I should be to keep using the same white label name servers (ns1.mydomain.com, ns2.mydomain.com, ns3.mydomain.com, ns4.mydomain.com) before and after the transfer, and without interruption.</p>
  
  <p>In yet another AWS support <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-inactive.html" rel="nofollow noreferrer">document</a> regarding domain transfers, which AWS says is "typically used when you're transferring domains from another registrar to Route 53, but the process is the same when you're transferring domains from one AWS account to another", AWS recommends that to make Route 53 the DNS service for your domain, you update the registration for the domain to use these four name servers.</p>
  
  <p>The difficulty here is that when I will be creating those glue records in account B in order to prepare for the transfer, the glue records for the name servers will still be pointing to the IP addresses associated with the old reusable delegation set in the hosted zone in account A (which, as I understand, can't be transferred out of account A). Therefore, if I recreate identical records for the my domain.com hosted zone in account B, I must do one of the following, before sending AWS a support ticket requesting they carry out the transfer of the domain from account A to account B:</p>
  
  <ol>
  <li>include glue records in the account B hosted zone for mydomain.com pointing to the IP addresses matching the name servers in the account A reusable delegation set, or</li>
  <li>include glue records in the account B hosted zone for mydomain.com pointing to the IP addresses matching the name servers in the account B reusable delegation set.</li>
  </ol>
  
  <p>Which is the correct way to do this?</p>