Course contentsShow
← Cloud and Infrastructure
Lesson 225 of 2,9894. Cloud Networking BasicsFree lesson

DNS Resolution Between VPCs

Learn techniques for enabling DNS resolution across peered or connected virtual networks.

DNS Resolution Between VPCs

What you'll learn: How to enable DNS name resolution across peered or interconnected virtual networks so resources can find each other by name.

The Core Challenge

When you peer two VPCs together (or connect them via Transit Gateway), routing works automatically—but DNS resolution doesn't by default. Resources in VPC-A can reach IP addresses in VPC-B, but they can't resolve the internal DNS names of resources there. It's like having a phone line between two buildings but no shared directory—you can dial numbers, but you can't look up names.

Why This Matters

Many applications use DNS names (like database.internal or EC2 private DNS names) instead of hardcoded IPs. Without cross-VPC DNS resolution, your services can't discover each other using their familiar names.

Enabling Cross-VPC DNS Resolution

For VPC peering, you enable two boolean settings on the peering connection itself:

  • Requester DNS resolution – allows VPC-A to resolve private DNS names in VPC-B
  • Accepter DNS resolution – allows VPC-B to resolve private DNS names in VPC-A

Both sides must enable their respective setting for bidirectional name resolution.

With Private Hosted Zones

If you're using Private Hosted Zones (custom internal domain names), you must associate the zone with both VPCs. For example, if myapp.internal is hosted in VPC-A's private zone, you associate that zone with VPC-B so resources there can also query it.

Think of It As

Imagine two offices sharing a connecting hallway (peering). Without DNS setup, employees can walk between buildings but can't look up each other's extension numbers. Enabling cross-VPC DNS is like sharing the company directory with both offices.

Key Takeaway: Cross-VPC DNS resolution must be explicitly enabled on peering connections or by associating Private Hosted Zones with multiple VPCs—routing alone doesn't provide name resolution.