Runbook: DNSSEC emergency — restore resolution#

Read the first section before doing anything. The instinctive fix here makes the outage worse.

The critical rule#

Remove the DS record at the registrar FIRST. Wait for it to expire from caches. Only then disable signing in AWS.

The reason: a validating resolver that sees a DS record in the .dev registry requires valid signatures. If you disable signing while DS is still published, the zone becomes completely unresolvable — not degraded, not warned about. SERVFAIL for every validating resolver, which is most of the internet.

Disabling signing feels like the fix. It is the thing that turns a signature problem into a total outage.

Triage#

SymptomLikely causeGo to
DNSSECInternalFailure alarmRoute 53 signing failureScenario A
DNSSECKeySigningKeysNeedingAction alarmKMS failure; KSK needs rotationScenario B
testz-prod-dnssec-chain-of-trust alarmPublic validating resolvers agree the zone does not validate. The probe's log says how (probe runbook)Scenario C if they report SERVFAIL; the DS runbook if the DS is gone
SERVFAIL from validating resolvers, resolves from non-validating onesBroken chain of trustScenario C
Resolves fine for you, reportedly broken for othersSame as above — your resolver is not validatingScenario C

Confirm the shape of the problem first:

# Non-validating: does the zone answer at all?
dig +short A testz.dev @ns-<one-of-your-ns>.awsdns-<xx>.com

# Validating: does a public validating resolver agree?
dig +dnssec A testz.dev @1.1.1.1
dig +dnssec A testz.dev @8.8.8.8

# Is the DS record still published?
dig +short DS testz.dev @1.1.1.1

# Full chain, with each validation step.
delv @1.1.1.1 testz.dev A +rtrace

If the authoritative nameservers answer but validating resolvers SERVFAIL, the chain is broken and Scenario C applies.

Scenario A — DNSSECInternalFailure#

Something in the zone is in INTERNAL_FAILURE. Often transient and self-correcting.

aws route53 get-dnssec --hosted-zone-id "$(tofu -chdir=terraform/environments/prod output -raw zone_id)"
  1. Check whether resolution is actually affected (commands above). If it is not,

you have time — do not rush into changes.

  1. Confirm the KMS key is enabled and not pending deletion:

``bash aws kms describe-key --key-id alias/testz-dnssec-ksk1 \ --query 'KeyMetadata.[KeyState,Enabled,DeletionDate]' ``

  1. If the key is PendingDeletion, cancel immediately — this is the highest

priority action available: ``bash aws kms cancel-key-deletion --key-id alias/testz-dnssec-ksk1 aws kms enable-key --key-id alias/testz-dnssec-ksk1 ``

  1. If the key is healthy, ask Route 53 to re-sign:

``bash aws route53 enable-hosted-zone-dnssec --hosted-zone-id "$ZONE_ID" ``

  1. If it persists beyond ~30 minutes and resolution is affected, go to

Scenario C.

Scenario B — DNSSECKeySigningKeysNeedingAction#

The KSK is in ACTION_NEEDED, almost always because KMS could not be reached or the key policy changed.

  1. Verify the key exists, is enabled, and its policy still grants

dnssec-route53.amazonaws.com: ``bash aws kms get-key-policy --key-id alias/testz-dnssec-ksk1 --policy-name default ` If the policy is wrong, tofu apply` restores it — the policy is managed.

  1. If the key is fine, reactivate the KSK:

``bash aws route53 activate-key-signing-key --hosted-zone-id "$ZONE_ID" --name ksk1 ``

  1. If the key is unrecoverable, this is a

KSK rotation under time pressure. If resolution is already broken, do Scenario C first to restore service, then rotate calmly.

Scenario C — broken chain, restore resolution now#

Goal: get the domain resolving again. DNSSEC protection is sacrificed temporarily. Order matters.

Step 1 — remove the DS record at the registrar#

Log into the registrar and delete the DS record. This is the single most effective action and it is entirely outside AWS.

Once the registry stops publishing DS, validating resolvers treat the zone as unsigned and resolution resumes.

The hourly probe will now report the zone insecure, and testz-prod-dnssec-chain-of-trust stays in ALARM until the DS is back. That is correct: the domain has lost its protection. Leave the alarm as it is; it clears by itself on the first hourly run after the DS is re-published in step 5 and resolvers have fetched it.

Step 2 — wait for the DS record to leave caches#

watch -n 30 'dig +short DS testz.dev @1.1.1.1; dig +short DS testz.dev @8.8.8.8'

The .dev DS TTL governs this — typically up to an hour. Do not proceed until both return nothing. Proceeding early re-creates the outage you are fixing.

Step 3 — confirm resolution has recovered#

dig +short A testz.dev @1.1.1.1
dig +short A testz.dev @8.8.8.8
curl -sI https://testz.dev | head -1

If the site is reachable, the incident is over. The zone is still signed, which is harmless without a DS record. You can now diagnose without time pressure.

Step 4 — only if you must disable signing in AWS#

Only after step 2 confirmed DS is gone from caches:

aws route53 disable-hosted-zone-dnssec --hosted-zone-id "$ZONE_ID"

Or in Terraform, enable_dnssec = false — but note prevent_destroy on the KMS key means a full removal needs a deliberate two-commit change. That guard is intentional.

That change fails tofu test on its pull request, by design: the production suite asserts that the zone is signed (ADR-0023). It does not hold up the fix. terraform-apply does not run the tests, so do not wait for them or edit them mid-incident. Step 5 turns the suite green again.

Step 5 — restore#

Once the cause is fixed:

  1. tofu apply with enable_dnssec = true.
  2. Confirm the zone is signing:

aws route53 get-dnssec --hosted-zone-id "$ZONE_ID".

  1. Confirm RRSIGs are present: dig +dnssec A testz.dev @<authoritative-ns>.
  2. Only then re-publish the DS record —

the DS runbook. Note the DS value will be different if the KSK was replaced.

What never to do#

  • Never delete the KMS key while the DS record is live. Scheduled deletion has

a 30-day window; actual deletion is irreversible and makes the zone permanently unsignable with that key.

  • Never delete and recreate the hosted zone. New nameservers and a new KSK,

so both the delegation and the DS record become wrong. prevent_destroy guards this.

  • Never change signing and DS in the same maintenance window. They must be

sequenced with cache expiry between them.

  • Never trust your own resolver to tell you whether the chain is healthy. Check

1.1.1.1 and 8.8.8.8, and verify your resolver validates at all with dig @1.1.1.1 dnssec-failed.org A (must SERVFAIL).

Afterwards#

Write up what happened. If the cause was structural rather than a one-off AWS failure, record it as an ADR — this stack's highest-severity failure mode deserves its reasoning captured.

Built 2026-11-25 from commit 33bfabf6a27d4baeecf228c31bd5d636a3965070. This page was generated from the same source that provisions the infrastructure it describes.