ADR-0012: Encryption keys chosen by data sensitivity#
- Status: accepted. The SNS alert topic row is revised by ADR-0018.
- Date: 2026-07-30
Context#
Three things in this stack are encrypted at rest, and the reflex answer — "customer-managed KMS key everywhere" — costs $1/month per key. With a total bill of $1.55, applying it uniformly would roughly triple the cost.
Encryption at rest defends against a specific threat: someone obtaining the underlying storage without going through the API. Whether that matters depends entirely on what the data is.
Decision#
Match the mechanism to the sensitivity of the data.
| What | Mechanism | Monthly | Why |
|---|---|---|---|
| Terraform state | SSE-KMS with the AWS-managed aws/s3 key, bucket keys on | $0.00 | State can contain sensitive values. AWS-managed keys carry no monthly charge — the $1 applies to customer-managed keys. This gets KMS-grade encryption and audit trail for free. |
| Site content | SSE-S3 (AES256), bucket keys on | $0.00 | The objects are a public website. Confidentiality at rest protects nothing that is not already published. |
| SNS alert topic | alias/aws/sns | $0.00 | Alarm notifications; AWS-managed key is sufficient. |
| DNSSEC signing key | Customer-managed, ECC_NIST_P256 | $1.00 | Not a choice — Route 53 requires a customer-managed asymmetric key. This is the only $1 in the stack. |
bucket_key_enabled = true everywhere SSE-KMS is used. Without it, every object operation is a billable KMS request; with it, a bucket-level data key is cached and KMS request volume drops by ~99%.
Alternatives considered#
Customer-managed KMS key for the state bucket. $1/month for key-policy control we do not currently need — cross-account access, custom rotation, or the ability to revoke a key independently of IAM. With one account and one set of CI roles, IAM is already the control. Worth revisiting if state ever needs to be shared across accounts.
Customer-managed KMS key for site content. $1/month plus a KMS request on every cache-miss origin fetch, to encrypt files that are served publicly over HTTPS to anyone who asks. It would be pure ceremony — the kind of control that looks good on a checklist and defends nothing.
SSE-S3 for state as well. Saves nothing, since the AWS-managed KMS key is also free, and loses the CloudTrail record of key usage. There is no reason to choose it.
No encryption at rest anywhere. Not really available — S3 encrypts by default now — and would be indefensible for state regardless.
Consequences#
Positive: the only key charge is the one AWS forces. State gets KMS-grade encryption and a CloudTrail audit trail at no cost. Each choice has a stated reason rather than being a uniform default, which is the point.
Negative: three different mechanisms across four resources is more to explain than "KMS everywhere" — hence this ADR. The state bucket's AWS-managed key cannot have a custom key policy, so if cross-account state access is ever needed it means migrating to a customer-managed key and re-encrypting.
Neutral: the real controls protecting both buckets are not encryption at rest at all. They are the public-access blocks, BucketOwnerEnforced, the OAC AWS:SourceArn condition, and the bucket policies denying non-TLS requests. Encryption at rest is the least load-bearing control here, which is exactly why it does not deserve $2/month.
Status notes#
- 2026-11-24. The SNS alert topic row did not work as decided. CloudWatch
alarms cannot publish to a topic encrypted with alias/aws/sns, because that key's policy cannot grant cloudwatch.amazonaws.com, so no alarm notification was ever delivered. ADR-0018 replaces that row with an unencrypted topic. The rest of this decision is unchanged.
Revisit when#
- State needs to be readable from another AWS account, which requires a
customer-managed key with a key policy.
- Anything genuinely confidential gets stored — at which point a customer-managed
key with a tight policy is correct and $1/month is irrelevant.
- A compliance regime requires customer-managed keys regardless of data
sensitivity.