Last active
December 28, 2022 05:47
-
-
Save coltenkrauter/655153d856ea658633bf54d2d0f49b6d to your computer and use it in GitHub Desktop.
AWS CLI Route53 – Transfer domain name from one account to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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