- Newest
- Most votes
- Most comments
This is not an aws issue but the way you are delegating subdomains. For it to work the way you want too, you will need to create the ns records for staging.app.mydomain.com in your production account within app.mydomain.com
Your making the whole production account authoritative for app.mydomain.com
The documentation is correct however your creating a subdomain of a subdomain.
Thank you for clarifying Gary.
What you describe is what I would call option 2 from the documentation, "you create a hosted zone for the lower-level subdomain, and then you create records in that new hosted zone". This is a fine approach, and I don't mind it at all.
One last question: If we are "limited" by how delegation of subdomains works, then can you give an example of option 1, "you create records in the hosted zone for the domain"? I just don't see any other options than the one you descried, so not sure why the documentation would suggest there are two.
I build my entire stack based around that one line, and now have to refactor a lot of my constructs to move the DNS routing around :/ I don't mind as I am just learning, but might prevent others from going down the same path.
To answer your example of Option 1 would then look like this.
Example.com in the root account.
Prod.example.com subdomain points to zone in prod account.
Staging.example.com subdomain points to zone in staging account.
If you want a record called api in each zone you create them in said zone. Eg api.prod.example.com would be created in production zone.
Relevant content
- asked 2 hours ago
- asked 6 months ago
- asked 2 months ago
- asked 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago