Enable DNSSEC in Route 53: KMS key, KSK and DS record
Route 53 signs your zone with a key-signing key backed by your own KMS key, and the DS record at the registrar is what makes resolvers enforce it. Set up DNSSEC in Route 53 in the right order and catch the KMS change that breaks it days later.
Offensly Team··5 min read
Your audit asks whether the zone is signed, and Route 53 answers no:
$ aws route53 get-dnssec --hosted-zone-id Z0EXAMPLE12345 --query Status
{
"ServeSignature": "NOT_SIGNING"
}Turning on DNSSEC in Route 53 takes three pieces: a KMS key Route 53 can sign with, a key-signing key (KSK) in the hosted zone, and a DS record at the registrar. Signing alone changes nothing for validating resolvers. The DS record is what makes them trust, and enforce, your signatures, so it goes in last.
What Route 53 signs for you, and what stays yours
Route 53 owns the zone-signing key and rotates it on its own every 7 to 30 days. The KSK is different: it is backed by a customer managed key in AWS KMS, and every signature over your DNSKEY set is a KMS Sign call (AWS docs). From this point that KMS key is a production dependency of your DNS. Treat it like one.
Two limits decide if you can sign the zone at all. Signing works only for public hosted zones, and Route 53 does not support multi-vendor setups with DNSSEC signing, so a secondary DNS provider serving the same zone has to go first (AWS docs). Once signing is on, Route 53 caps record TTLs at one week without telling you.
Before you enable DNSSEC in Route 53
Check that the parent has no DS record left over from a previous DNS provider:
$ dig DS example.com +shortEmpty output is what you want. If a DS comes back and you just moved to Route 53, fix that first; the article on DNSSEC DS record mismatch walks through it.
Then lower the zone's longest TTL to 3600 seconds and lower the SOA TTL and minimum field as well. AWS recommends this so that a rollback reaches resolvers within an hour instead of a day (AWS docs). You can raise them again after two quiet weeks.
Create the KSK and turn on signing
- Open Hosted zones, choose the zone and select the DNSSEC signing tab. Choose Enable DNSSEC signing.
- Under Key-signing key (KSK) creation, choose Create new KSK and give it a name of letters, numbers and underscores, for example
example_com_ksk_2026. - Under Customer managed CMK, type a new alias and let Route 53 create the key. Do this unless your organisation requires keys from a central team. Route 53 then sets the key type and policy correctly.
- Choose Enable DNSSEC signing.
If you bring your own key, it must be in US East (N. Virginia), asymmetric, with key spec ECC_NIST_P256 and usage sign and verify (AWS docs). Its policy needs the Route 53 DNSSEC service principal (AWS docs):
{
"Sid": "Allow Route 53 DNSSEC Service",
"Effect": "Allow",
"Principal": { "Service": "dnssec-route53.amazonaws.com" },
"Action": ["kms:DescribeKey", "kms:GetPublicKey", "kms:Sign"],
"Resource": "*"
}plus a second statement allowing kms:CreateGrant for the same principal with the condition kms:GrantIsForAWSResource set to true. A key in another region or with an RSA spec will not work.
Now wait at least the old maximum TTL before you add the DS. Resolvers holding unsigned answers from before do no harm, but you want every cache to have seen the signed zone before validation starts.
Publish the DS record at the registrar
On the same tab, choose View information to create DS record and open Establish a chain of trust. Check the values from the CLI as well:
$ aws route53 get-dnssec --hosted-zone-id Z0EXAMPLE12345 \
--query 'KeySigningKeys[].[Name,Status,KeyTag,DSRecord]' --output text
example_com_ksk_2026 ACTIVE 12345 12345 13 2 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEFStatus must read ACTIVE. In the DS value, 12345 is the key tag, 13 the algorithm (ECDSA P-256 with SHA-256) and 2 the digest type (SHA-256). Registrars that list algorithms by name want the P-256 entry; picking an RSA option produces a DS that matches nothing.
Domain registered with Route 53. Go to Registered domains, select the domain, open the DNSSEC keys tab and choose Add key. Pick the key type and algorithm 13, paste the Public key value from the hosted zone (not the DS string) and choose Add.
Domain at another registrar. Paste the DS record value into the registrar's DNSSEC form and set a DS TTL of 300 if the form allows it. Some registrars push DS changes to the registry once a day, so an empty dig DS an hour later is not yet a failure.
Confirm validation from outside AWS
$ dig A example.com @1.1.1.1 +dnssec
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20417
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1The ad flag means 1.1.1.1 validated the answer. Also compare dig DS example.com +short with the KeyTag above. Resolvers begin validating once the parent's NS TTL runs out, so give it a day before you call it done.
KSK status "Action needed": find which of three causes
ACTION_NEEDED means Route 53 lost access to the KMS key. Route 53 keeps pre-generated signatures that last a few days, then validating resolvers start returning SERVFAIL (AWS docs). That delay makes it easy to miss the link to a KMS change made days earlier. Read the key state first:
$ aws kms describe-key --region us-east-1 --key-id alias/example_com_dnssec \
--query KeyMetadata.KeyState
"PendingDeletion"PendingDeletion: runaws kms cancel-key-deletion, thenaws kms enable-key. Cancelling leaves the keyDisabled(AWS KMS docs), and a disabled key still cannot sign.Disabled: runaws kms enable-key.Enabled: the policy changed. Runaws kms get-key-policyand look fordnssec-route53.amazonaws.com. If someone added the optionalaws:SourceArncondition, check that it names this hosted zone and not another one.
After the fix, activate the KSK again on the DNSSEC signing tab.
Do not disable signing as a quick way out while the DS is still at the parent. Resolvers then expect signatures the zone no longer serves, and the whole domain fails. To back out, remove the DS, wait its TTL, and only then disable signing.
Set CloudWatch alarms on DNSSECKeySigningKeysNeedingAction and DNSSECInternalFailure in the AWS/Route53 namespace, in us-east-1, and alert on any value above 0 (AWS docs).
The KMS key nobody remembers owning
The KMS key is a separate line item on the AWS bill, and a cleanup that deletes it takes DNS with it. When it goes, users behind validating resolvers lose the website, inbound mail and any API on the domain days later, with no DNS change in the log. The alarm costs a few minutes to set up and catches this inside the pending-deletion window.
With the chain of trust in place, it is a good moment to restrict which certificate authorities may issue for the domain. The advanced DNS check in a free Offensly account, on a domain you have verified, reads DS, DNSKEY and CAA from outside AWS.
Check your own domain in seconds
The free check reads your SPF, DKIM, DMARC and MX records and tells you exactly what to fix. No sign-up.