Repository navigation
Description
Found while redeploying the reaper for #645. The documented deploy command would have caused a production regression on the component that guards against runaway cost.
The hazard
lambda/ttl-reaper/Makefile declares defaults, and writes all 13 of them into .deploy-params.yaml on every make deploy — so each one is asserted, not left alone:
| parameter | Makefile default | live production value |
|---|---|---|
DRY_RUN |
true |
false — the reaper is ARMED |
DNS_SWEEP |
false |
true |
DNS_ZONE_ID |
(empty) | Z0341053304H0DQXF6U4X |
DNS_DOMAIN |
(empty) | spore.host |
ALARM_TOPIC_ARN |
(empty) | arn:aws:sns:us-east-1:966362334030:spawn-sweep-alerts |
ACCOUNTS_TABLE_KEY_ARN |
(empty) | arn:aws:kms:us-east-1:966362334030:key/48eefc31-… |
So a plain make deploy — the command in DEPLOYMENT.md — would:
- Disarm the production reaper (
DryRun: false → true). Everything keeps running and reporting; it just stops terminating anything. That is the worst possible failure mode for a cost backstop: silent, and invisible until an instance outlives its TTL. - Turn off DNS sweep and blank the hosted-zone/domain, disabling DNS records leak when spored doesn't exit through Cleanup (abrupt terminate/spot/crash) — no backstop reaper #438.
- Detach the alarm topic, so the failure alarms this stack creates fire into nothing — including fix(ttl-reaper): add alarm for the reaper not being invoked at all #504's new not-invoked alarm, which exists precisely to catch a reaper that stopped running.
The irony is that the Makefile's own comment block (lines 18-23) explains the opposite risk very carefully — that an omitted parameter becomes UsePreviousValue and is therefore unreachable, which is why #438 could not be enabled from make deploy. The fix for that was to pass every parameter explicitly. That solved unreachability and created this: now every parameter is overwritten with a default that does not match production.
Not hypothetical
The stack had not been updated since 2026-07-31. Anyone redeploying it today — to pick up #504's alarm, #625's fsx:/ssm: grants, or #645's packaging fix — would reach for make deploy.
I avoided it only by reading the live stack first and generating a complete 16-parameter override file from describe-stacks output, then diffing all 16 afterwards to prove zero drift. That should not be the thing standing between a routine redeploy and a disarmed reaper.
Note the Makefile passes 13 of the template's 16 parameters; MaxAge, Regions and Schedule are omitted and so do rely on UsePreviousValue. Regions matters — its template default is a fixed 11-region list, and if that ever diverged from what is deployed, a fallback would silently change reaper coverage.
Suggested shapes
- Read-then-write. Have
deployfetch current stack parameters and use them as the defaults, so an unspecified value means "keep what is deployed" rather than "reset to the Makefile's idea of default". Preserves the DNS records leak when spored doesn't exit through Cleanup (abrupt terminate/spot/crash) — no backstop reaper #438 fix (anything you do pass still gets through) while making the dangerous direction impossible. - Refuse to change the dangerous ones implicitly. Require
DRY_RUNto be passed explicitly for an existing stack; abort with a diff if an unspecified parameter would change. Cheap, and it turns a silent regression into a prompt. - At minimum, print the before/after diff and require confirmation — the Makefile already echoes the mode-setting parameters, but it echoes what it is about to send, not what that changes.
(1) seems right: the information is one describe-stacks away, and it is what I did by hand.
Worth checking elsewhere
lambda/autoscale-orchestrator and lambda/pipeline-orchestrator use the same sam deploy --parameter-overrides pattern with Makefile-side defaults. I have not audited whether their defaults match what is deployed.
Activity
fix(reaper): read the live stack before deploying, so unspecified par…
chore(release): v0.117.0
fix(reaper): region-explicit deploy; an unreadable stack must abort, …
fix(autoscale): scope the coverage check to the env, and drop the spa…
docs: map the deployed control plane in the infra account (#782)
Make the reaper's computed VERSION reach CloudFormation (#869) (#874)