Transferring your domain between 2 AWS accounts

gw151226
2 min readJan 12, 2021

The complete step-by step guide in under 3 minutes.

Prerequisite: install/upgrade AWS CLI

The official installation guide is very clear on this so if you haven’t done so, follow the link here.

Now you are ready to begin!

The domain transfer process is divided into 3 main steps:

1. A basic configuration step

2. A transfer initiation step

3. A transfer acceptance step

1. Basic configurations

Inside the command prompt, type the code below to start the configuration.

aws configure

5 AWS account infos will be required afterwards:

(All the account infos used below are of your current account containing the domain!)

  1. AWS account id
  2. AWS secure key id
  3. AWS private secure key
  4. Region (The current hosting region i.e. us-east-1, ap-east-2, eu-central-1…whichever one you have currently chosen to host your domain in.)
  5. Output format
  • AWS secure key id and AWS private secure key can be generated in the “My security credentials” at the top right corner of the AWS console.
  • Remember to download all the keys as the private key will only be given to you once after each generation of credential!
  • Use json as your output format.

2. Initiating the transfer

After you are done with the configuration, type the code below to start the domain transfer process to your other AWS account.

aws route53domains transfer-domain-to-another-aws-account — domain-name <domain name> — account-id <account id>

You will need to modify the following 2 variable with your own info:

  1. <domain name>: fill in your domain here, e.g. example.com
  2. <account-id>: fill in the account id that you are transferring the domain to

Upon success, a password will be generated for you.

It will look something like this:

{“OperationId”: “317f6ff2–4cd6–43f9–8424–434f6b5d546d”,“Password”: “qH/!C8,4e>B{p7”}

Replace the OperationId line of code with the following:

“DomainName”: “example.com”

You need to save this as a .json file inside your computer.

3. Accepting the transfer

Now you need to login to your other AWS account.

(All the account infos used now are of the account you are transferring the domain to!)

aws configure

Do the same as you have done so before with Step 1 for the id, keys…

Finally, type the code below to complete the transfer:

aws route53domains accept-domain-transfer-from-another-aws-account — domain-name <domain name> — cli-input-json file://path/to/yourfile.json
  • Copy the path of your json file containing the password from Step 2 and re-format as such — file:/(your path)

All done! Your domain has now been transferred!

Give me a clap if this has been helpful to you. :)

--

--