Skip to content

Instantly share code, notes, and snippets.

@coltenkrauter
Last active December 28, 2022 05:47
Show Gist options
  • Save coltenkrauter/655153d856ea658633bf54d2d0f49b6d to your computer and use it in GitHub Desktop.
Save coltenkrauter/655153d856ea658633bf54d2d0f49b6d to your computer and use it in GitHub Desktop.
AWS CLI Route53 – Transfer domain name from one account to another
TRANSFER_DOMAIN_NAME='example.com'
ACCOUNT_A=1234567890
ACCOUNT_B=2345678901
# Setup profiles to auth with each account
aws configure --profile ACCOUNT_A
aws configure --profile ACCOUNT_B
# List the domain names registered in account a
aws route53domains list-domains --profile ACCOUNT_A
# Unlock domain and initiate the transfer
aws route53domains disable-domain-transfer-lock --domain-name $TRANSFER_DOMAIN_NAME --profile ACCOUNT_A
aws route53domains transfer-domain-to-another-aws-account --domain-name $TRANSFER_DOMAIN_NAME --account-id $ACCOUNT_B --profile ACCOUNT_A
# Output:
# {
# "OperationId": "c327fg9–3sae-39334-ah34-gs273ms2112",
# "Password": "**********"
# }
# Complete the transfer using the password from the above output and lock the domain
aws route53domains accept-domain-transfer-from-another-aws-account --domain-name $TRANSFER_DOMAIN_NAME --password '<value>' --profile ACCOUNT_B
aws route53domains enable-domain-transfer-lock --domain-name $TRANSFER_DOMAIN_NAME --profile ACCOUNT_B
# Verify that your domain has been transferred
aws route53domains list-domains --profile ACCOUNT_B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment