Associating an Amazon VPC and a private hosted zone that you created with different Amazon accounts
If you want to associate a VPC that you created with one Amazon account with a private hosted zone that you created with a different account, perform the following procedure:
To associate an Amazon VPC and a private hosted zone that you created with different Amazon accounts
-
Using the account that created the hosted zone, authorize the association of the VPC with the private hosted zone by using one of the following methods:
Amazon CLI – See create-vpc-association-authorization in the Amazon CLI Command Reference
AmazonSDK or Amazon Tools for Windows PowerShell – See the applicable documentation on the AmazonDocumentation page
Amazon Route 53 API – See CreateVPCAssociationAuthorization in the Amazon Route 53 API Reference
Note the following:
If you want to associate multiple VPCs that you created with one account with a hosted zone that you created with a different account, you must submit one authorization request for each VPC.
When you authorize the association, you must specify the hosted zone ID, so the private hosted zone must already exist.
You can't use the Route 53 console either to authorize the association of a VPC with a private hosted zone or to make the association.
Using the account that created the VPC, associate the VPC with the hosted zone. As with authorizing the association, you can use the Amazon SDK, Tools for Windows PowerShell, the Amazon CLI, or the Route 53 API. If you're using the API, use the AssociateVPCWithHostedZone action.
Recommended – Delete the authorization to associate the VPC with the hosted zone. Deleting the authorization does not affect the association, it just prevents you from reassociating the VPC with the hosted zone in the future. If you want to reassociate the VPC with the hosted zone, you'll need to repeat steps 1 and 2 of this procedure.
Important
The
ListHostedZonesByVPC
returns the hosted zones given a VPC andGetHostedZone
API returns the VPCs associated to the hosted zone. These APIs only consider the hosted zone to VPC association that are created byAssociateVPCWithHostedZone
API or when the private hosted zone is created. If you want a complete list of hosted zone associations to a VPC, also call ListProfileResourceAssociations.Note
For the maximum number of authorizations that you can create, see Quotas on entities.