ADR-0009: No AWS WAF#

  • Status: accepted
  • Date: 2026-07-30

Context#

Attaching a WAF to a CloudFront distribution is a near-reflex in AWS reference architectures, and its absence is the kind of thing a security checklist flags. This ADR exists so the absence is a recorded decision rather than an apparent oversight.

Decision#

Do not attach an AWS WAF web ACL. Leave web_acl_id unset, with a comment in the Terraform pointing here.

The reasoning#

There is nothing for it to protect. A WAF inspects requests for attacks against an application. This distribution serves static files from a private S3 bucket. There is:

  • no database, so no SQL injection,
  • no server-side rendering or templating, so no template injection,
  • no authentication or sessions, so no credential stuffing or session fixation,
  • no user input processed anywhere — the one dynamic endpoint,

/api/whoami, accepts no parameters, forwards no query strings and no cookies, and reads only CloudFront-generated headers,

  • no file upload, no deserialisation, no shell execution.

The OWASP Top 10 managed rule group would inspect every request for injection patterns against a system that cannot be injected into.

The cost is disproportionate. ~$5/month for the web ACL, ~$1/month per rule group, plus $0.60 per million requests. The whole rest of the stack is $1.55/month. A WAF would be roughly four times the cost of everything else combined, to defend against a class of attack that has no target.

DDoS is already covered. AWS Shield Standard is included with CloudFront at no charge and handles network- and transport-layer attacks. Shield Advanced is $3,000/month.

The real risks here are elsewhere. The plausible threats are a compromised deploy path, DNS hijacking, and certificate mis-issuance. Those are addressed by OIDC with no long-lived credentials, an environment-gated apply, DNSSEC, and CAA — none of which a WAF touches.

Alternatives considered#

WAF with only the AWS managed core rule set. Still ~$6/month minimum, still protecting nothing.

WAF purely for rate limiting. The most defensible version of the argument — it would cap a request flood before it eats the CloudFront free tier. Rejected because the budget alarm covers the cost concern more cheaply, and CloudFront's free tier (1 TB, 10M requests) is a generous ceiling for a personal documentation site.

WAF for the demonstration value. Considered and rejected on principle. Deploying a control that defends nothing, in a project meant to demonstrate judgement, would demonstrate the opposite. Explaining why there is no WAF is a better demonstration than having one.

Consequences#

Positive: $5–7/month saved, which is more than the entire rest of the stack. No rule tuning, no false positives blocking legitimate requests. The security story stays focused on controls that address real threats.

Negative: compliance scanners and security checklists will flag it, and that will need explaining more than once — hence this document. No request-rate limiting beyond CloudFront's own. If the site ever gains a dynamic endpoint, this decision must be revisited before that ships, not after.

Neutral: adding a WAF later is a one-line change plus a web ACL resource. The door is not closed.

Revisit when#

  • Any endpoint accepts user input that reaches a data store, a template, or a

shell. This is the trigger, and it is not optional.

  • Authentication is introduced.
  • A sustained abusive traffic pattern appears that CloudFront's free tier and the

budget alarm do not adequately contain.

  • The DNS server or DoH resolver on the roadmap gains an HTTP surface that parses

untrusted input — a DoH endpoint parsing wire-format DNS messages is exactly the kind of thing that changes this answer.

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