passdrill
AWS SAA-C03 · VPC & Networking · Card 031/038 medium

Two VPCs, A and B, are connected by an active VPC peering connection, and both VPCs already have DNS hostnames and DNS resolution enabled. An instance in VPC A resolves the public DNS hostname of an instance in VPC B (for example, ec2-x-x-x-x....amazonaws.com) and gets back that instance's public IPv4 address, even though both instances could reach each other privately over the peering connection. What must be configured so that resolving that same public DNS hostname instead returns the private IPv4 address, keeping the traffic off the public internet path?

  1. Nothing further is possible; a public DNS hostname always resolves to a public IP address, regardless of any VPC peering configuration
  2. Create a Route 53 private hosted zone associated with both VPCs and manually add records duplicating every instance's public hostname
  3. Enable the 'DNS resolution' option for the VPC peering connection — with the owner of the requester VPC enabling it for the requester side and the owner of the accepter VPC enabling it for the accepter side — which makes the public DNS hostname resolve to the instance's private IPv4 address for requests that traverse that peering connection
  4. Disable the enableDnsHostnames attribute on both VPCs; turning off DNS hostname support is what causes public hostnames to resolve to private addresses over a peering connection
Next card → Shuffle