AWS 域转移到其他AWS 账号 记录踩坑
aws route53domains transfer-domain-to-another-aws-account --domain-name "test.com" --account-id "对方账户ID"
账户ID在IAM里面可以看
用aws cli 转移的时候出现出问题连不到 思考Route53是全球服务 指定的region不行
Could not connect to the endpoint URL: "https://route53domains.us-west-1.amazonaws.com/"
然后我把region换成Global,蜜汁自信,再次看到熟悉的报错 - -!
Could not connect to the endpoint URL: "https://route53domains.Global.amazonaws.com/"
然后更换了python接口,然并卵,还是相同的报错。google才发现有前人遇到这个问题 指定的region要用 us-east-1 说好的全球区域呢
附上转移的python3代码
#!/usr/bin/env python3
# coding=utf-8
import boto3
#这里填写源账号授权密钥 授权在IAM里面生成
aws_access_key_id = ''
aws_secret_access_key = ''
region_name = 'us-east-1'
client = boto3.client('route53domains',
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
region_name=region_name )
response = client.transfer_domain_to_another_aws_account(
#要转移的域名
DomainName='yejunhai.com',
#接收方账户ID
AccountId='111111111'
)
print(response)
respon返回结果里面有’Password’要记录下来 接收方要用
#!/usr/bin/env python3
# coding=utf-8
import boto3
#接收方的授权密钥
aws_access_key_id = ''
aws_secret_access_key = ''
region_name = 'us-east-1'
client = boto3.client('route53domains',
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
region_name=region_name )
response = client.accept_domain_transfer_from_another_aws_account(
#接受的域名
DomainName='yejunhai.com',
#password在转移后respon有返回转移密码
Password="12345678"
)
print(response)
respon响应200 就转移成功了 到新账户就有域名了 DNS记录要另外转
————————————————
https://blog.csdn.net/weixin_46175620/article/details/113309961