是的,在Route53中实现跨账户子域委派时,需要将AWS账户加入AWS组织。以下是一些代码示例:
创建AWS组织
aws organizations create-organization --feature-set ALL
创建主账户和成员账户
aws organizations create-account --email test1@example.com
aws organizations create-account --email test2@example.com
将成员账户添加到组织
aws organizations list-accounts
aws organizations list-accounts-for-parent --parent-id
aws organizations move-account --account-id --source-parent-id --destination-parent-id
将主账户的Route53服务委派给成员账户
aws route53 create-hosted-zone --name example.com --caller-reference 2019-05-13-01 --hosted-zone-config Comment="This zone is delegated to AWS account 123456789012" --delegation-set-id /delegationset/N14M9IJFOWEJHV
aws route53 associate-vpc-with-hosted-zone --hosted-zone-id --vpc VPCId=,VPCRegion=
aws route53 create-traffic-policy --name ExamplePolicy --document file://example-policy.json
aws route53 create-traffic-policy-instance --hosted-zone-id --name ExamplePolicyInstance --traffic-policy-id --ttl 300