Score:0

AWS DNS alias for VPC local resources

mx flag

I'd like to be able to provide a resource SRV that lives in two different VPCs. So I'd give them DNS names srv.vpc1.corp.com and srv.vpc2.corp.com.

What I'm trying to figure out is if I can provision a srv.corp.com which always goes to the in-VPC destination? That is, requests in vpc1 will always go to srv.vpc1.corp.com, and requests in vpc2 will always go to srv.vpc2.corp.com.

Route53 does have latency related routing but that doesn't appear to be able to guarantee the result will be local to the VPC. Route53 can have private zones per VPC but they can't overlap at the domain level. I could get another domain name or use corp.local per VPC, but that would require changing existing lookups.

Are there any other possibilities to make this work?

Tim avatar
gp flag
Tim
You should be able to create a private hosted zone in each VPC.
mx flag
@Tim I looked into that but I'd have to duplicate the entire zone for each VPC. That would be do-able but unpleasant.
Tim avatar
gp flag
Tim
Using CloudFormation infrastructure as code, with a single condition, you can deploy to two accounts in no time. Plenty of examples of Route53 hosted zone CloudFormation online. If you're deliberately duplicating your DNS you're going to have duplication.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.