Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

route53 transfer domain to another aws account

I am trying to transfer my domain from one AWS account to another AWS account. I have tried boto3 SDK Route53domains client as given here: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53domains.html#Route53Domains.Client.transfer_domain_to_another_aws_account but my code returns this error: 'Route53Domains' object has no attribute 'transfer_domain_to_another_aws_account'. How do i try to transfer my domain other than contacting AWS Support.

import boto3


client = boto3.client('route53domains')

if __name__ == "__main__":
    response = client.transfer_domain_to_another_aws_account(
                DomainName='domain.com',
                AccountId='MY_ACCOUNT_ID'
            )
    print(response)
like image 441
pyhotshot Avatar asked Dec 18 '25 06:12

pyhotshot


1 Answers

The process has changed a lot but it is still simple.

There is no option on AWS Console to transfer domains between AWS accounts. The only domain transfer you can do on the console is to bring it from outside the purview of AWS Route53 like GoDaddy.com or Google Domains into AWS.

However, you can do the transfer by yourself using the CLI option. To do this, you must ensure that you have aws-cli 2.09 at least. If yes, then follow the steps using the cli to transfer from 1 AWS account into another one:-

Step 1: Using old account IAM cli credentials, check if you can see your domains or not by aws route53domains list-domains. Then initiate the domain transfer using the below command:-

aws route53domains transfer-domain-to-another-aws-account --domain-name <your domain name> --account-id <destination AWS account id>

Step 2: From above step, you will get an output in a JSON format with operationid and password like:-

{
    "OperationId": "c837dj8-5eae-29334-ah72-hs873ns8282",
    "Password": "ZKAHD\\WE.4LK\\US"
}

Change that OperationId to DomainName and store it in a new JSON file along with the password like below:-

{
    "Password": "ZKAHD\\WE.4LK\\US",
    "DomainName": "example.com"
}

Step 3: Execute the last command to accept that domain using the IAM CLI credentials of your destination AWS account or profile like below:-

aws route53domains accept-domain-transfer-from-another-aws-account --cli-input-json file://acceptDomainTransfer.json --profile gsp

Step 4: Done :) Just execute that list-domains command again using new account CLI credentials and you will see your domain moved and listed here:-

aws route53domains list-domains
like image 147
vinod827 Avatar answered Dec 20 '25 23:12

vinod827



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!