Skip to content

Cross-account Route 53

Delegating subdomains to hosted zones in other AWS accounts lets each environment or team manage its own DNS without access to the parent domain.

The mechanism is an NS record in the parent zone pointing at the child zone’s name servers. Nothing is shared between the accounts: the parent simply says “for this subdomain, ask those servers”.

  • Parent DNS account — holds the hosted zone for the registered domain, example.com.
  • Child accounts — hold hosted zones for subdomains: dev.example.com, test.example.com, and so on.

A hosted zone is a container for the records that define how traffic is routed for a domain or subdomain. Every hosted zone is created with two record sets:

  • NS — the four name servers Route 53 has assigned to this zone
  • SOA — administrative information about the zone
  1. Confirm the hosted zone for example.com exists and its NS records match what the registrar publishes for the domain.
  2. Note the domain’s name servers; you will be adding a delegation to them.
  1. Create a public hosted zone for the subdomain, dev.example.com.
  2. Record the four NS values Route 53 generated for it.
  1. Open the example.com hosted zone.
  2. Create a record of type NS with the name dev.example.com.
  3. Enter the four name server values from the child account’s hosted zone, one per line.

That is the delegation. Records created in the child account under dev.example.com now resolve publicly, and the parent account never sees them.

Repeat for each subdomain and account.

Terminal window
# The parent zone should return the child's name servers
dig +short NS dev.example.com
# Query the child's name servers directly to confirm they are authoritative
dig @ns-1234.awsdns-12.org dev.example.com SOA

Separation. A team with permission to change dev.example.com has no permission over example.com. A mistake in one environment cannot take the apex down.

Visibility. Queries, health checks and query logging are per hosted zone, so each environment’s DNS activity is separately observable and billable.

Simpler IAM. Route 53 permissions are granted per hosted zone; delegation gives you a natural boundary to grant them on.

  • Grant each child account permission on its own hosted zone only.
  • Keep the parent account’s role in the process to creating and reviewing delegations.
  • Record delegations somewhere outside Route 53 — a delegation that nobody remembers creating is one nobody dares delete.
  • Use a consistent subdomain convention: environments (dev, test, staging), or Regions (eu-west-2), but not both at the same level.
SymptomLook at
The subdomain does not resolveIs the child zone public? Do the NS values in the parent match the child’s current name servers?
It resolves for some clients onlyPropagation. The parent zone’s own TTL on the NS record governs this
It resolved and then stoppedThe child hosted zone was deleted and recreated; Route 53 assigns new name servers, and the parent’s NS record now points at the old ones
Records exist but return NXDOMAINThe records are in a different zone from the one delegated — check for a duplicate hosted zone for the same name