AWS Route53: Private and public hosted zones under the same domain

beefaroni picture beefaroni · Jun 28, 2016 · Viewed 7.3k times · Source

I've read through all the AWS docs I can find and GoogleFoo has not resulted in anything.

My case here is we have one domain example.com and up to now we have used it only for Public records. There is one Hosted Zone set to Public. I want to now create a subdomain for private records to use inside of our VPC group for our application (e.g. to point at an ElastiCache instance).

I attempted to create private.example.com as a Private Hosted Zone pointing at our VPC and then created cache.private.example.com as a record under it but it will not resolve.

I am curious if I can configure a subdomain of our main domain somehow?

example.com - Public
** app.example.com 
private.example.com - Private
** cache.private.example.com - VPC

OR

Can also create a Private Hosted Zone with the same top level domain example.com? I am nervous to try that because I do not want to affect the application.

example.com - Public
** app.example.com
example.com - Private
** cache.example.com - VPC

Answer

Matthew McCants picture Matthew McCants · Jun 28, 2016

You will need to have a different domain for the private zone. Something like "example.internal" Then you could have "cache.example.internal"

cache.private.example.com will not resolve in your current setup, because it will be looking to example.com to resolve that dns. Also note it will only resolve inside the VPC.