I'm having real difficulty in getting the environments setup on 2 AWS accounts which are related to each other by the virtue of Organisation Hierarchy. My root DNS provider is GoDaddy which is hosting DNS record for example.com
. We have multiple services which needs to be hosted on subdomain services.example.com
. My setup is like:
example.com
. Has NS record entries for services.example.com
pointing to AWS Prod Account's Hosted Zoneservices.example.com
. Within this hosted zone I have A Records for production services service1.services.example.com
, service2.services.example.com
, etc.Service 1:
test.service1.services.example.com
uat.service1.services.example.com
release.service1.services.example.com
Service 2:
test.service2.services.example.com
uat.service2.services.example.com
release.service2.services.example.com
Is there any way that I can achieve this. I have attached an image for visually simplifying this setup.
Create a hosted zone for service1.services.example.com
in Acc 2.
Note the 4 name servers that Route 53 assigns to it the new hosted zone.
Back in the services.example.com
(master zone) on Acc 1, create a new resource record, with hostname service1
using record type NS, and enter the 4 name servers that Route 53 assigned, in the box below.
You just delegated the service1.services.example.com
subdomain, and any hosts and subdomains in it, to a different hosted zone, which you can now break to your heart's content, without impacting the the other records.
And just can just repeat the same process for all other services you want to delegate as well. You will end up with a new hosted zone for each service, but that is a totally fine way of doing so.
The hosted zone for the subdomain can be in the same account or a different account.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With