- Newest
- Most votes
- Most comments
The short answer is yes, there can be a small propagation window, but the "Placeholder VPC" approach is the industry-standard way to minimize it.
However, you won't find a "zero-millisecond" guarantee in the docs because it's a distributed system, but the placeholder method is the safest way to avoid the „NXDOMAIN trap“ !
1. The Propagation Window
When you call AssociateVPCWithHostedZone, Route 53 must update the VPC Resolver configuration for every DNS node within that VPC's infrastructure. While GetChange tracks the status of records within the Hosted Zone itself, it does not track the propagation of the VPC association rule.
- The VPC Resolver starts routing queries to the Private Hosted Zone (PHZ) only after the association logic hits that specific DNS node.
- Because this is a distributed system, there is a sub-second to multi-second window where some nodes might still use the public resolution while others use the PHZ.
2. Why the Placeholder VPC works
Your assumption is correct: By ensuring records are INSYNC before associating the consumer VPC, you eliminate the "NXDOMAIN" risk.
- Without Placeholder: Creating the zone directly in the VPC creates an empty zone. The Resolver immediately routes queries there, sees no records, and returns NXDOMAIN.
- With Placeholder: The zone is already "primed." When the VPC Resolver finally switches over to the PHZ, the records are already present on the authoritative side. The only "gap" is whether the Resolver picks up the new association rule yet, not whether the records exist.
3. Is this a supported pattern?
Yes. AWS effectively recommends this for cross-account or complex migrations. To achieve true zero-downtime:
1. Prime the PHZ (Placeholder approach).
2. Match TTLs: Ensure the TTL of your PHZ records matches or is lower than the public records during the transition.
3. Consistency: Since the VPC Resolver uses an eventual consistency model for configuration changes, the transition is "atomic" per DNS node, but "gradual" across the entire VPC fleet.
The records should already be INSYNC in the private zone first, then the VPC association should also reach INSYNC.
Relevant content
- asked 6 months ago
