ADR-0018: An unencrypted alert topic, so alarms can be delivered#
- Status: accepted. Revises the SNS alert topic row of ADR-0012.
- Date: 2026-11-24
Context#
ADR-0012 encrypted the SNS alert topic with the AWS-managed alias/aws/sns key, on the reasoning that alarm notifications need nothing stronger and the AWS-managed key is free.
The reasoning about sensitivity was right, but the mechanism does not work. When a CloudWatch alarm publishes to an encrypted topic, CloudWatch itself needs kms:GenerateDataKey* and kms:Decrypt on the topic's key. The key policy of an AWS-managed key is written by AWS and cannot be changed, and it does not grant cloudwatch.amazonaws.com. So every alarm action failed. The DNSSECInternalFailure, DNSSECKeySigningKeysNeedingAction and certificate-expiry alarms changed state and delivered nothing. The topic policy granting CloudWatch sns:Publish was correct, but it was not enough. The November 2026 review found this (finding 1). Nothing had noticed, because nothing tested delivery from end to end.
The budget notifications were never affected: AWS Budgets emails subscribers directly.
What these notifications carry: the alarm name and description, the metric name, threshold and recent values, the region, the alarm ARN and the account ID. None of it is confidential. The alarm names and thresholds are in this repository. The account ID is kept out of the repository and logs (ADR-0011), but it is in every email whatever the topic's key, because encryption at rest in SNS ends when SNS delivers the message. Messages sit in SNS only for the seconds it takes to deliver them.
Decision#
The alert topic is not encrypted at rest. CloudWatch can then publish to it, which is the one thing the topic exists for.
- Trivy's
AWS-0095(unencrypted SNS topic, HIGH) is waived inline, next to the
resource, citing this ADR. The previous waiver, AWS-0136 (topic not encrypted with a customer-managed key), no longer applies and is removed.
- The topic policy already denies
sns:Publishwhenaws:SecureTransportis
false, so the in-transit control stays. CloudWatch's publish grant stays constrained by aws:SourceAccount.
- A
tofu testassertion fails if the topic is givenalias/aws/snsagain.
Further assertions check that the topic policy grants CloudWatch, constrains aws:SourceAccount and denies insecure transport, and that every guardrail alarm notifies the topic on both ALARM and OK.
- Delivery is tested from end to end by the
alarm-delivery-testworkflow
(workflow_dispatch only). It forces one guardrail alarm into ALARM and back to OK, and fails if CloudWatch reports that either SNS action failed. To allow it, the apply role gains cloudwatch:SetAlarmState and cloudwatch:DescribeAlarmHistory on the three guardrail alarm ARNs only.
This fixes the topic's encryption only. Everything else in ADR-0012 stands.
Alternatives considered#
A customer-managed symmetric KMS key whose policy grants CloudWatch. This is the configuration AWS documents, and it keeps a CloudTrail record of key use. It would cost $1.00/month, which takes the bill from about $1.55 to $2.55, an increase of about 65%. The money would protect alarm names and metric values from someone reading SNS's storage directly. That is exactly the case ADR-0012 rejected for the site bucket: a control that defends nothing in particular. It also adds a key policy to get right and a key to keep enabled. If that key were disabled or its policy broken, the alarms would go silent again without any error, the same failure this ADR fixes. The existing DNSSEC key cannot be reused, because it is an asymmetric signing key and SNS needs a symmetric encryption key. The apply role's kms:CreateKey permission is also restricted to ECC_NIST_P256 signing keys (DnssecSigningKeyCreate in terraform/bootstrap/oidc.tf), so this option would also need a bootstrap change to let it create a symmetric key.
A Lambda relay: alarms send to EventBridge, and a function forwards to an encrypted topic or sends mail itself. EventBridge receives alarm state changes without any SNS key, so this would work. But it adds a function, an execution role, a log group and a failure mode, all to keep encrypting messages that do not need it. Every extra piece is something more that can stop alarms arriving.
Keep alias/aws/sns and rely on other monitoring. The external dns-health probe runs late, sometimes by many hours (roadmap item 4). It also cannot see Route 53's own signing failures or a certificate renewal that has stopped. The CloudWatch alarms are the only AWS-side warning of those failures, so they have to work.
Waive AWS-0095 in Trivy configuration rather than inline. An inline waiver sits next to the resource and its reason, which is how every other waiver here is done. One in a config file would be easier to overlook and would outlive the resource.
Consequences#
Positive: alarm notifications can be delivered, once this has been applied and the email subscription confirmed. The fix costs nothing a month. Delivery can now be tested from end to end without anyone holding AWS credentials, and the regression test stops the AWS-managed key coming back unnoticed.
Negative: the topic is not encrypted at rest, and a security scanner reports it as HIGH unless the waiver is read. Anyone auditing against a checklist that requires encryption on every SNS topic will flag it, and this ADR is the answer. The apply role gains permission to force the state of the three guardrail alarms. Anyone holding that role could already delete or rewrite those alarms, so this adds nothing it could not already do. The workflow is a manual test, not a monitor: delivery can break again (for example, the email subscription removed or the inbox filtering it) and nothing notices until someone runs it.
Neutral: the subscription is not recreated. Removing the key is an in-place update to the topic, so a subscription that was already confirmed stays confirmed.
Status notes#
- 2026-11-24. In force. Applied by
terraform-apply; the apply role's
GuardrailAlarmDeliveryTest permission was applied by bootstrap-account. The first alarm-delivery-test run forced the certificate-expiry alarm to ALARM and back to OK. CloudWatch reported both SNS actions as successful, and both emails reached the alert inbox.
- 2026-11-25. The topic gains two more alarms, from the hourly DNSSEC
probe (ADR-0020), and GuardrailAlarmDeliveryTest now covers five alarms rather than three: the probe's dnssec-chain-of-trust and dnssec-probe-silent. Same reasoning as above. Applied the same day; the probe's end-to-end test delivered an ALARM and an OK for dnssec-chain-of-trust to the alert inbox.
Revisit when#
- The alert topic starts carrying anything confidential, for example a
notification that includes request data. At that point a customer-managed key with a policy granting the publishing services is correct, and $1/month does not matter.
- AWS lets the AWS-managed SNS key be used by CloudWatch, or CloudWatch gains
another way to publish to an encrypted topic without a customer-managed key.
- A customer-managed symmetric key exists here for another reason, at which
point the topic should use it as well.
- A compliance regime requires encryption at rest on every topic regardless of
content.