Question: How do I transfer ownership of a domain or an Amazon Route 53 hosted zone to a different AWS account?

I want to transfer ownership of a domain or Amazon Route 53 hosted zone from one AWS account to another. How can I do this?Short descriptionYou can transfer a domain from one AWS account to another using the TransferDomainToAnotherAwsAccount command.Although it's a best practice to transfer a domain using an API call, you can also transfer a domain by contacting AWS Support.If you don't own both the source and destination accounts that you're transferring the domain to and from, you must do one of the following:Migrate the existing hosted zone to the AWS account that you're transferring the domain to,-or-Create a new hosted zone in an AWS account that you own.If you don't own the account that created the hosted zone that routes traffic for the domain, then you can't control how traffic is routed.

ResolutionMigrate a hosted zoneFollow the steps in Migrating a hosted zone to a different AWS account.Transfer a domainNote: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.1.    Run the following command in the AWS CLI. Replace example.com with your domain name. Replace 111122223333 with your AWS account ID.aws route53domains transfer-domain-to-another-aws-account --domain-name example.com --account-id 111122223333 --region us-east-12.    In the output, note the Password value.3.    To accept the transfer, log in to the AWS account that is the destination account. Then, run this command. Replace example.com with your domain name. Replace YourPassword with the password that you noted in step 2.aws route53domains accept-domain-transfer-from-another-aws-account --domain-name example.com --password YourPassword --region us-east-1If you receive errors accepting the transfer, see the Troubleshoot accepting a domain section of this article.Note: The accept-transfer command must be completed within three days of the transfer domain call. After three days, the transfer is canceled.4.    After accepting the transfer, view the domain by accessing the Route 53 console and then choosing the Registered Domains tab.Troubleshoot accepting a domainIf you encounter errors while accepting a transfer, then the generated password might contain special characters. Use one of two options to solve this:(Option 1) Use a text file to accept the domain transfer1.    Create a .txt file that contains the password that was generated in Step 2 of the Transfer a domain section. Use a simple format.2.    Run the accept-transfer command:aws route53domains accept-domain-transfer-from-another-aws-account --domain-name <domain name> --password file:///tmp/password.txt --region us-east-1Note: Replace  with your domain, and replace password in password.txt with the name of your file. Also, make sure that the Region is correct.(Option 2) Use quotation marks around the password stringsUse single or double quotation marks around your password to prevent the AWS CLI from misinterpreting special characters.The following example uses double quotation marks:aws route53domains accept-domain-transfer-from-another-aws-account --domain-name example.com --password "YourPassword" --region us-east-1The following example uses single quotation marks:aws route53domains accept-domain-transfer-from-another-aws-account --domain-name example.com --password 'YourPassword' --region us-east-1Related informationTransferring a domain to a different AWS account