You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leave no trace: nothing reaps the control plane — the lambdas, their roles/rules/alarms, or the buckets spawn auto-creates #653
Project philosophy, stated 2026-10-03: spore.host should "leave no trace." This extends the existing lifecycle invariant ("everything dies eventually") from launched instances to the control plane itself.
The TTL reaper is the backstop for instances. Nothing is the backstop for the reaper, or for anything else the tools create.
Long-lived artifacts with no reaper
artifact
created by
reaped by
3 SAM stacks: lambdas + execution roles + EventBridge rules + CloudWatch alarms + log groups
make deploy
nothing
spawn-results-<account>-<region> buckets
task run, auto-created
nothing — and no lifecycle policy, so completion.json and command.log accumulate indefinitely
deliberately left behind by reaper teardown, which removes rule/permission/function/role and reports what it kept
per-task scoped instance profiles + roles
CreateOrGetInstanceProfile
nothing
lagotto's capacity-poller stack
lagotto deploy
nothing
The artifact-bucket retention was a conscious choice at the time. Under "leave no trace" it is worth revisiting.
The hard part
MaxAge (168h) bounds instances. There is no equivalent notion for the control plane's own footprint, and a self-deleting reaper is chicken-and-egg: it has to outlive what it reaps. So this is a design question, not a one-line fix. Plausible shapes:
An inventory command — spawn footprint / spawn orphans --control-plane: enumerate everything spore.host has created in an account, so "leave no trace" is at least auditable before it is automatic. Cheapest, and useful immediately.
Teardown completeness — make reaper teardown (and a new equivalent for the other stacks) remove everything including buckets, with an explicit --keep-artifacts opt-out rather than silent retention.
Retention on the data — an S3 lifecycle policy on spawn-results-* at creation time. Bounded, independent of the harder reaping question, and arguably the biggest real cost today since nothing ever prunes it.
Idle control-plane detection — a reaper that notices it has had nothing to do in N days and reports (not self-deletes).
(1) and (3) are separable and worth doing regardless of how the rest lands.
Not in scope here
Deleting a user's data without asking. Several of these hold results someone may still want — which is exactly why the honest first step is making the footprint visible rather than automatically removing it.
Related: #650 (deploy hazard in the same area), #645 (packaging), #625 (reaper deploy/teardown).
Measured the footprint before acting, and two of this issue's priorities are wrong
Shape (1) — "make the footprint visible" — turns out to be worth more than it
looks, because doing the measurement by hand immediately contradicted the table
above. All figures from 966362334030 / us-east-1 today.
(3) is NOT "the biggest real cost today"
The issue says an S3 lifecycle policy on spawn-results-* is "arguably the
biggest real cost today since nothing ever prunes it." Measured:
spawn-results-435415984226-us-east-1
182 objects, 83,302 bytes total
oldest 2026-07-19, newest 2026-09-05
83 KB after three months of use — a fraction of a cent per month, and only
one such bucket exists across both accounts. A retention policy there is still
right under "leave no trace" (bounded by design rather than by luck), but it is hygiene, not cost control, and prioritising it over the items below would be
backwards. It also removes any pressure to pick an aggressive retention, which
matters given the issue's own "do not delete a user's data without asking".
The actual unbounded thing is not in the table: log groups with no retention
10 log groups with retentionInDays = null (never expire)
51,236,505 bytes
Including /aws/lambda/spawn-dashboard-api at 28.7 MB and /aws/lambda/spawn-dns-updater at 14.5 MB. Only 4 of 14 have retention set, and
those are the ones a SAM template declares (LogGroup with RetentionInDays: 30)
— every log group auto-created by Lambda on first invocation has none, by
default, forever. That is the one artifact here that genuinely grows without
limit, and it is absent from the inventory above.
The bucket count is 21, not 2
The table lists two bucket patterns. The account holds 21spawn*/spore*
buckets, including a family nobody has mentioned:
spawn-queue-results-test — a test bucket from 2026-05-01
Revised priority
Set retention on the 10 log groups with none, and make every Lambda deploy
path declare it so a new function cannot create an immortal log group. This is
the only measured unbounded growth. It deletes log data older than the
window, so it needs a decision on the window rather than my picking one.
Shape (1), the inventory — now clearly the highest-value step, since doing
it by hand found a bucket family and a log-group class the issue did not know
about. A spawn footprint that enumerates rather than matching a remembered
list, for the same reason lambda-version-census.sh had to stop hardcoding
function names (spored and the lambdas never upgrade with the CLI, and nothing warns about the skew #654: it listed 5, the account had 16).
spawn-queue-results-test and the 11 regional binaries buckets want a
decision on whether they are still load-bearing, which is a question for a
human, not a reaper.
spawn-results-* retention — do it, but as hygiene, last.
Retention applied, and both "cleanup candidates" turned out to be load-bearing
First, a correction to my own measurement above
I reported "10 log groups, 51 MB". It is 14 groups and 238.7 MB. My query
filtered on spawn*/spore* prefixes — which is the "match a remembered list"
mistake I had warned about one paragraph earlier, made immediately afterwards.
Enumerating without a prefix filter changes the picture substantially:
group
size
note
/aws/lambda/lagotto-capacity-poller
189.79 MB
80% of the total, and not spawn's
/aws/lambda/spawn-dashboard-api
27.36 MB
/aws/lambda/spawn-dns-updater
13.88 MB
/aws/lambda/github-oauth-bridge
0.01 MB
the function was deleted; its log group outlived it
github-oauth-bridge is a clean "leave no trace" finding in its own right:
deleting a Lambda does not delete its log group. Anything that removes a
function needs to remove the group too, or the footprint outlives the thing that
made it.
6 groups set (4 imagebuilder, capacity-poller, portal phone-home) → 0 remaining
942542972736 / us-west-2
only the 2 that are ours — lagotto-capacity-poller, spawn-ttl-reaper-selfscan
That last row was deliberately scoped. The account has 57 groups without
retention, but most belong to unrelated projects (geos-chem-*, inside-the-lines-web-tool, /aws/batch/job, /aws/sagemaker/ProcessingJobs).
Applying a retention there would delete someone's project data on spore.host's
behalf, which is not spore.host's call. Worth flagging anyway: geos-chem-cost-tracking-RealTimeCostTracker… holds 1,169 MB with no retention
— far larger than anything in the control plane, and entirely your decision.
Neither bucket is deletable — both are load-bearing
I listed both as cleanup candidates. Checked, and both are wrong:
spawn-queue-results-test is empty, but referenced by integration
fixtures — testdata/integration/queue/timeout-queue.json, dependency-queue.json (result_s3_bucket), and scheduler/schedule-with-queue.yaml. Deleting it breaks those tests.
The 11 spawn-binaries-<region> buckets are core infrastructure, not cruft:
cmd/launch_config.go:541-543 — the Windows bootstrap pulls spored-windows-amd64.exe from spawn-binaries-$region
803 objects in us-east-1, 538 in ap-northeast-1, including lambda artifacts
newest object: spored-windows-amd64.exe.sig, 2026-10-09T01:23:38Z — written
by the v0.126.1 release a few hours ago
They are per-region by design: an instance in ap-northeast-1 should not pull its
agent across the planet from us-east-1. Regional duplication is the feature.
Where that leaves this issue
The one measured unbounded-growth item is now bounded, in code (#770) and in the
live accounts. What remains is the inventory command, and its case is stronger
than when this issue was written: three separate attempts at a footprint list
here — the issue's own table, my prefix-filtered query, and my bucket
"candidates" — were each incomplete or wrong. That is the argument for a command
that enumerates instead of a list anyone maintains by hand.
Cross-ref: #610 now covers this under the owner's principle (2026-10-24) that anything spore.host creates is removed when it is no longer needed, alongside the "users never create IAM" audit. Also add these to the inventory here: the per-policy-hash instance/task roles (spawn-instance-<hash>), which are never deleted, and the planned spawn-staging-* bucket (#1293).
Split into concrete issues: #1300 (per-task IAM roles), #1301 (empty buckets), #1302 (control-plane teardown). This issue stays open as the umbrella. The principle and the audit are tracked in #610.
Evidence: The umbrella was split on 2026-10-25. #1300 and #1301 closed 2026-10-26, the inventory shipped as spawn footprint (PR #771), and log retention shipped in PR #770. The remaining teardown work is #1302 (open), and the principle is tracked in #610.
If this is wrong, reopen it and it goes back into the hardening queue.
Activity
scttfrdmn commentedon Oct 9, 2026
Measured the footprint before acting, and two of this issue's priorities are wrong
Shape (1) — "make the footprint visible" — turns out to be worth more than it
looks, because doing the measurement by hand immediately contradicted the table
above. All figures from
966362334030 / us-east-1today.(3) is NOT "the biggest real cost today"
The issue says an S3 lifecycle policy on
spawn-results-*is "arguably thebiggest real cost today since nothing ever prunes it." Measured:
83 KB after three months of use — a fraction of a cent per month, and only
one such bucket exists across both accounts. A retention policy there is still
right under "leave no trace" (bounded by design rather than by luck), but it is
hygiene, not cost control, and prioritising it over the items below would be
backwards. It also removes any pressure to pick an aggressive retention, which
matters given the issue's own "do not delete a user's data without asking".
The actual unbounded thing is not in the table: log groups with no retention
Including
/aws/lambda/spawn-dashboard-apiat 28.7 MB and/aws/lambda/spawn-dns-updaterat 14.5 MB. Only 4 of 14 have retention set, andthose are the ones a SAM template declares (
LogGroupwithRetentionInDays: 30)— every log group auto-created by Lambda on first invocation has none, by
default, forever. That is the one artifact here that genuinely grows without
limit, and it is absent from the inventory above.
The bucket count is 21, not 2
The table lists two bucket patterns. The account holds 21
spawn*/spore*buckets, including a family nobody has mentioned:
spawn-binaries-<region>buckets (ap-northeast-1,ap-southeast-1/2, ca-central-1, eu-central-1, eu-west-1/2, us-east-1/2,
us-west-1/2) — created Apr–May 2026
spawn-certs-us-east-1,spawn-cloudformation-artifacts-us-east-1,spawn-pipelines-us-east-1,spawn-sweeps-us-east-1,spawn-schedules-{us-east-1,us-west-2,eu-west-1}spawn-queue-results-test— a test bucket from 2026-05-01Revised priority
path declare it so a new function cannot create an immortal log group. This is
the only measured unbounded growth. It deletes log data older than the
window, so it needs a decision on the window rather than my picking one.
it by hand found a bucket family and a log-group class the issue did not know
about. A
spawn footprintthat enumerates rather than matching a rememberedlist, for the same reason
lambda-version-census.shhad to stop hardcodingfunction names (spored and the lambdas never upgrade with the CLI, and nothing warns about the skew #654: it listed 5, the account had 16).
spawn-queue-results-testand the 11 regional binaries buckets want adecision on whether they are still load-bearing, which is a question for a
human, not a reaper.
spawn-results-*retention — do it, but as hygiene, last.Nothing changed in AWS; this is measurement only.
scttfrdmn commentedon Oct 9, 2026
Retention applied, and both "cleanup candidates" turned out to be load-bearing
First, a correction to my own measurement above
I reported "10 log groups, 51 MB". It is 14 groups and 238.7 MB. My query
filtered on
spawn*/spore*prefixes — which is the "match a remembered list"mistake I had warned about one paragraph earlier, made immediately afterwards.
Enumerating without a prefix filter changes the picture substantially:
/aws/lambda/lagotto-capacity-poller/aws/lambda/spawn-dashboard-api/aws/lambda/spawn-dns-updater/aws/lambda/github-oauth-bridge/aws/lambda/portal-phone-home,prism-bot, 9 othersgithub-oauth-bridgeis a clean "leave no trace" finding in its own right:deleting a Lambda does not delete its log group. Anything that removes a
function needs to remove the group too, or the footprint outlives the thing that
made it.
Applied: 30-day retention, everywhere spore.host owns
lagotto-capacity-poller,spawn-ttl-reaper-selfscanThat last row was deliberately scoped. The account has 57 groups without
retention, but most belong to unrelated projects (
geos-chem-*,inside-the-lines-web-tool,/aws/batch/job,/aws/sagemaker/ProcessingJobs).Applying a retention there would delete someone's project data on spore.host's
behalf, which is not spore.host's call. Worth flagging anyway:
geos-chem-cost-tracking-RealTimeCostTracker…holds 1,169 MB with no retention— far larger than anything in the control plane, and entirely your decision.
Neither bucket is deletable — both are load-bearing
I listed both as cleanup candidates. Checked, and both are wrong:
spawn-queue-results-testis empty, but referenced by integrationfixtures —
testdata/integration/queue/timeout-queue.json,dependency-queue.json(result_s3_bucket), andscheduler/schedule-with-queue.yaml. Deleting it breaks those tests.The 11
spawn-binaries-<region>buckets are core infrastructure, not cruft:cmd/launch_config.go:541-543— the Windows bootstrap pullsspored-windows-amd64.exefromspawn-binaries-$regioncmd/upgrade_spored.go:174—spawn upgrade-sporedfetchesspawn-binaries-${REGION}/spawn/versions/${TARGET_VERSION}spored-windows-amd64.exe.sig, 2026-10-09T01:23:38Z — writtenby the v0.126.1 release a few hours ago
They are per-region by design: an instance in ap-northeast-1 should not pull its
agent across the planet from us-east-1. Regional duplication is the feature.
Where that leaves this issue
The one measured unbounded-growth item is now bounded, in code (#770) and in the
live accounts. What remains is the inventory command, and its case is stronger
than when this issue was written: three separate attempts at a footprint list
here — the issue's own table, my prefix-filtered query, and my bucket
"candidates" — were each incomplete or wrong. That is the argument for a command
that enumerates instead of a list anyone maintains by hand.
fix(lambda): bound log retention, and gate that every deploy path set…
feat(cmd): spawn footprint — report the control plane, delete nothing (…
docs: map the deployed control plane in the infra account (#782)
fix(reaper): teardown removes the artifact bucket (#786)
build: make check runs the nested-module loop, via the script CI uses (…
remove: the spawn alerts path and the stranded self-hosted stack (#783)…
remove: alert-evaluator and the dashboard's alert-preferences endpoin…
scttfrdmn commentedon Oct 24, 2026
Cross-ref: #610 now covers this under the owner's principle (2026-10-24) that anything spore.host creates is removed when it is no longer needed, alongside the "users never create IAM" audit. Also add these to the inventory here: the per-policy-hash instance/task roles (
spawn-instance-<hash>), which are never deleted, and the plannedspawn-staging-*bucket (#1293).scttfrdmn commentedon Oct 25, 2026
Split into concrete issues: #1300 (per-task IAM roles), #1301 (empty buckets), #1302 (control-plane teardown). This issue stays open as the umbrella. The principle and the audit are tracked in #610.
scttfrdmn commentedon Nov 8, 2026
Closing during the pre-1.0 backlog triage (spore-host/spore-host#644): duplicate.
Evidence: The umbrella was split on 2026-10-25. #1300 and #1301 closed 2026-10-26, the inventory shipped as spawn footprint (PR #771), and log retention shipped in PR #770. The remaining teardown work is #1302 (open), and the principle is tracked in #610.
If this is wrong, reopen it and it goes back into the hardening queue.