Skip to content

WAF changes

Jens Luebeck edited this page Nov 13, 2026 · 1 revision

An AWS WAF web ACL, Amplicon_WAF (us-east-1), sits in front of both the prod and dev load balancers. It decides which automated clients reach the site. Because dev and prod share it, every change is a production change, and none can be tried on dev first.

What it does today

  • Any client can reach the JSON API (/api/v1/) and the discovery files (/robots.txt, /llms.txt, /sitemap.xml, /.well-known/). That includes curl, scripts and agents. The API is rate-limited per IP.
  • HTML pages are open to browsers, search crawlers, and verified AI fetchers such as ChatGPT-User. Scripts and unverified bots get a 403. Since 2026-11-13 that 403 is a short text pointing at /llms.txt and the API, not AWS's bare page.
  • A bare 403 from a page URL is not an outage. Health-check with a browser user agent, or curl localhost:8000/ on the box.

How to change it

Only with the tool in the repository, python -m amprepo_waf. Its README, amprepo_waf/README.md, has the commands and what each check protects. This page doesn't repeat them, so there is one copy to keep current.

In short:

  1. Each change is a named function in amprepo_waf/edits.py, reviewed in a PR like any other code.
  2. python -m amprepo_waf edit <name> is a dry run: it shows the diff, runs the checks, and has AWS validate the rules.
  3. Applying is a production write. It needs its own explicit approval, and prod's operator lock. Take the lock on the prod box; the tool runs on your laptop with your AWS login, so it can't take the lock itself.
  4. Run probe before and after. Keep the undo record in a durable place outside this public repository: it shows exactly what gets through.

Never hand-run aws wafv2 update-web-acl. It replaces the whole ACL, and any field you leave out is deleted. The tool exists because of that.

Clone this wiki locally