route53将域转移到另一个AWS帐户

时间:2020-07-07 23:24:16

标签: python-3.x amazon-web-services boto3 amazon-route53

我正在尝试将我的域从一个AWS账户转移到另一个AWS账户。我尝试了以下给定的boto3 SDK Route53domains客户端:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53domains.html#Route53Domains.Client.transfer_domain_to_another_aws_account,但是我的代码返回了此错误: 'Route53Domains' object has no attribute 'transfer_domain_to_another_aws_account'。除了联系AWS支持之外,我如何尝试转移我的域。

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)

1 个答案:

答案 0 :(得分:3)

除非您需要对许多域进行自动化或重复此过程,否则我建议您仅使用Route53 Management Console来转移域。

另一种选择是使用aws cli:(documentation

aws route53domains transfer-domain-to-another-aws-account --region us-east-1 --domain-name <value> --account-id <value>

关于您当前收到的错误,我怀疑您可能需要更新boto3。