Domain Transfer to another AWS Account

Transfer a domain to another AWS account

~ 1 minutes read

Transferring a domain from one AWS account to another is possible via AWS API and AWS CLI. Recently I had to transfer a domain. I experienced three interesting cases using the AWS CLI (version 2.1.21):

route53domains AWS CLI call
route53domains AWS CLI call

route53domains AWS CLI call

The AWS CLI documentation: https://docs.aws.amazon.com/cli/latest/reference/route53domains/transfer-domain-to-another-aws-account.html does not contain an example like the one below unfortunately:

aws route53domains transfer-domain-to-another-aws-account \
 --domain-name [yourdomain.com] \
 --account-id [your_aws_account_id] \
 --region us-east-1

AWS Region

Regardless which AWS region your services run in, the aws cli command

 aws route53domains 

requires always the region flag:

--region us-east-1

AWS R53 is a so called global service that requires this fixed region flag.

Accept transfer request with password flag

aws route53domains transfer-domain-to-another-aws-account \
 --domain-name [yourdomain.com] \
 --account-id [your_aws_account_id] \
 --region us-east-1

produces an output like

{
 "OperationId": "54f1a722-f7a6-4d6b-939a-124d5946dfa0",
 "Password": "a8`U^u1a2d*pa;"
 }

Within the target AWS account, you shall accept the domain transfer request.

aws accept-domain-transfer-from-another-aws-account \
 --domain-name [yourdomain.com] \
 --password "a8`U^u1a2d*pa;"

I could provide the password only via the CLI parameter

--password

and not via a json file using the parameter:

--cli-input-json

The documentation describes the behaviour very well. However I wish I could provide the json output of transfer-domain-to-another-aws-account as json input to accept-domain-transfer-from-another-aws-account.

Links

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.