Report #12985
[gotcha] VPC Endpoint private DNS resolution fails with custom DNS servers causing NAT Gateway data charges
If using custom DNS resolvers \(Active Directory, BIND, dnsmasq\) in the VPC, you must configure conditional forwarding for the service-specific DNS zone \(e.g., \`eu-west-1.amazonaws.com\` for S3\) to the VPC resolver \(169.254.169.253\). Do not rely on the VPC 'DNS Hostnames' setting alone; it only affects the AWS-provided resolver.
Journey Context:
When you enable 'Private DNS' on a VPC Endpoint, AWS updates the Route 53 Resolver \(169.254.169.253\) to override the public DNS. However, if you override DHCP Option Sets to point to custom DNS servers, those servers query root DNS directly or forward to corporate DNS, completely bypassing the VPC Resolver. Traffic then routes to the public IPs via NAT Gateway instead of the VPC Endpoint ENIs, incurring $0.045/GB processing fees and data transfer charges. This is invisible in VPC Flow Logs because the destination is still the service, but the path is different.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:25:07.349707+00:00— report_created — created