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
The EC2 path is proven against substrate but never against real AWS. Validate the full flow on a real account: credentials → RunInstances with spawn:* tags → the spored userdata bootstrap installs + runs → the instance self-terminates on a short TTL.
Cost safety (per spore.host policy): use a tight --ttl, terminate explicitly, and leak-check (no orphaned instances/volumes/EIPs) afterward.
Before spending anything on a real launch, I audited the launch path against real AWS + the actual spored release infra. Launching as-is would strand a billing instance rather than validate self-termination — the bootstrap can't install a working spored. Four concrete gaps, all fixable in spawn-ts code:
spored download URL 404s.src/aws/userdata.ts fetches github.com/spore-host/spawn/releases/latest/download/spored_linux_amd64 → 404 (verified). No such bare-binary asset exists; GitHub releases ship versioned tarballs (spored_0.89.0_linux_arm64.tar.gz). The Go bootstrap (pkg/launcher/bootstrap.go) actually installs from S3 regional buckets: https://spawn-binaries-<region>.s3.amazonaws.com/spored-linux-<arch> — verified anonymously downloadable (HTTP 200/206) at the legacy path. spawn-ts invented a URL that never existed.
Hardcoded amd64. t4g.nano (and any Graviton) is arm64; the Go bootstrap does uname -m → amd64/arm64. spawn-ts must detect arch in-script.
No IAM instance profile.RunInstances in src/aws/ec2.ts attaches none, so spored can't call DescribeTags/TerminateInstances — self-termination is impossible even if the binary installs. Needs an IamInstanceProfile on the launch (+ a way to supply/select the spored role).
No AMI resolution.spec.ami must be a real AMI id; nothing resolves one per region/arch (SSM public parameter for AL2023).
These were invisible because the EC2 path was only tested against substrate, which doesn't execute user-data.
Plan: fix the bootstrap (real S3 URL + arch detection + checksum, mirroring Go) and the IAM/AMI plumbing FIRST (code-only, no spend), then do the approved real launch (t4g.nano, 10-min TTL, us-east-1, explicit terminate + leak-check). Filing the bootstrap-URL bug as its own issue.
EC2Provider (real AWS, aws:us-east-1) resolved a current arm64 AL2023 AMI (ami-00b18f89b5bdfb338, al2023-ami-2023.12.20260720.0-kernel-6.1-arm64) via DescribeImages — no hardcoded AMI.
Launched i-0ad2d762fe1d21f8e, attached spored-instance-profile, spawn:ttl-deadline tag set 10 min out.
Reached running with a public IP within ~90s.
Explicitly terminated; confirmed terminated and no orphaned volumes. Only other spawn:managed instance in the account (build-medium-cgui) is unrelated/pre-existing. Spend ≈ $0.0001.
Divergence from the Go bootstrap (acceptance item 3): spawn-ts installs from the same S3 buckets and does arch detection + SHA256 verify, but does not verify the publisher signature (the Go bootstrap's optional SPORED_SIG_VERIFY, which needs a compiled-in signing key spawn-ts doesn't have). Checksum-only, matching the Go default when no key is compiled in.
Not yet done (follow-up): I terminated at ~90s rather than paying to idle a real instance for the full 10 min to watch spored fire the TTL unattended. The install path + IAM + tags are all validated; observing the daemon self-terminate end-to-end is a small, separately-scheduled paid run. Leaving #2 open until that's done, or happy to close it as "launch path validated" if you prefer.
Unattended TTL observation — the guarantee does NOT yet fire
Ran the full observation this time (5-min TTL, polled without terminating). The instance did not self-terminate — still running 4+ min past its deadline until the backstop killed it. Filed as #19.
The bootstrap fixes (#18) are validated: spored installs and executes (console shows the systemd symlink + binary running). But its systemd unit crash-loops (res=success/res=failed every ~5s), so the daemon never enforces the TTL. Also spotted an SELinux mislabel — the binary inherits cloud_init_tmp_t from the /tmp mktemp mv, allowed only because AL2023 is permissive.
✅ Self-termination validated end-to-end on real AWS
Root cause was a one-line divergence on the instance side: the systemd unit ran spored run, but the daemon is the bare spored invocation — the unknown subcommand made spored exit non-zero and the unit crash-looped, so it never enforced the TTL. Fixed in #20 by matching the Go bootstrap's unit byte-for-byte.
Re-ran the unattended observation (t4g.nano, 5-min TTL, us-east-1, spored-instance-profile):
18:52:27 state=running (+0.1m past deadline)
18:52:57 state=shutting-down ✅ spored SELF-TERMINATED on TTL
Stayed running right to the deadline, then spored wound it down ~35s later with no action from me. Confirmed terminated, no orphaned instances/volumes.
✅ IAM role confirmed (spored-instance-profile: DescribeTags/DescribeInstances/CreateTags + Terminate/StopInstances)
✅ divergence from Go noted: checksum-only (no publisher-signature verify; Go's optional SPORE_DNS_SIGV4/signing key isn't compiled into spawn-ts), and the browser-side S3 download vs Go's launcher — instance-side unit is now identical.
Closing. Total spend across all validation runs today: under 3¢.
Activity
scttfrdmn commentedon Jul 21, 2026
Pre-launch investigation (read-only, no spend)
Before spending anything on a real launch, I audited the launch path against real AWS + the actual spored release infra. Launching as-is would strand a billing instance rather than validate self-termination — the bootstrap can't install a working spored. Four concrete gaps, all fixable in spawn-ts code:
src/aws/userdata.tsfetchesgithub.com/spore-host/spawn/releases/latest/download/spored_linux_amd64→ 404 (verified). No such bare-binary asset exists; GitHub releases ship versioned tarballs (spored_0.89.0_linux_arm64.tar.gz). The Go bootstrap (pkg/launcher/bootstrap.go) actually installs from S3 regional buckets:https://spawn-binaries-<region>.s3.amazonaws.com/spored-linux-<arch>— verified anonymously downloadable (HTTP 200/206) at the legacy path. spawn-ts invented a URL that never existed.amd64. t4g.nano (and any Graviton) is arm64; the Go bootstrap doesuname -m→ amd64/arm64. spawn-ts must detect arch in-script.RunInstancesinsrc/aws/ec2.tsattaches none, so spored can't callDescribeTags/TerminateInstances— self-termination is impossible even if the binary installs. Needs anIamInstanceProfileon the launch (+ a way to supply/select the spored role).spec.amimust be a real AMI id; nothing resolves one per region/arch (SSM public parameter for AL2023).These were invisible because the EC2 path was only tested against substrate, which doesn't execute user-data.
Plan: fix the bootstrap (real S3 URL + arch detection + checksum, mirroring Go) and the IAM/AMI plumbing FIRST (code-only, no spend), then do the approved real launch (t4g.nano, 10-min TTL, us-east-1, explicit terminate + leak-check). Filing the bootstrap-URL bug as its own issue.
scttfrdmn commentedon Jul 21, 2026
Live validation run (documented)
Fixes in #18. After the four bootstrap gaps were fixed (see prior comment + spawn-ts#17), ran a real launch within the approved cost envelope.
Envelope: t4g.nano · us-east-1 · 10-min TTL ·
spored-instance-profile· one instance · explicit terminate + leak-check.Run:
EC2Provider(real AWS,aws:us-east-1) resolved a current arm64 AL2023 AMI (ami-00b18f89b5bdfb338,al2023-ami-2023.12.20260720.0-kernel-6.1-arm64) viaDescribeImages— no hardcoded AMI.i-0ad2d762fe1d21f8e, attachedspored-instance-profile,spawn:ttl-deadlinetag set 10 min out.terminatedand no orphaned volumes. Only otherspawn:managedinstance in the account (build-medium-cgui) is unrelated/pre-existing. Spend ≈ $0.0001.IAM confirmed (acceptance item 2):
spored-instance-profile→spored-instance-rolegrantsec2:DescribeTags/DescribeInstances/CreateTags+ec2:TerminateInstances/StopInstances— exactly spored's self-lifecycle needs.Divergence from the Go bootstrap (acceptance item 3): spawn-ts installs from the same S3 buckets and does arch detection + SHA256 verify, but does not verify the publisher signature (the Go bootstrap's optional
SPORED_SIG_VERIFY, which needs a compiled-in signing key spawn-ts doesn't have). Checksum-only, matching the Go default when no key is compiled in.Not yet done (follow-up): I terminated at ~90s rather than paying to idle a real instance for the full 10 min to watch spored fire the TTL unattended. The install path + IAM + tags are all validated; observing the daemon self-terminate end-to-end is a small, separately-scheduled paid run. Leaving #2 open until that's done, or happy to close it as "launch path validated" if you prefer.
fix: real-AWS bootstrap + IAM profile + AMI resolution (#2, #17) (#18)
scttfrdmn commentedon Jul 21, 2026
Unattended TTL observation — the guarantee does NOT yet fire
Ran the full observation this time (5-min TTL, polled without terminating). The instance did not self-terminate — still
running4+ min past its deadline until the backstop killed it. Filed as #19.The bootstrap fixes (#18) are validated: spored installs and executes (console shows the systemd symlink + binary running). But its systemd unit crash-loops (
res=success/res=failedevery ~5s), so the daemon never enforces the TTL. Also spotted an SELinux mislabel — the binary inheritscloud_init_tmp_tfrom the/tmpmktempmv, allowed only because AL2023 is permissive.So #2 splits cleanly:
Keeping #2 open, now blocked on #19. Both live instances today were terminated + leak-checked; total spend <2¢.
scttfrdmn commentedon Jul 21, 2026
✅ Self-termination validated end-to-end on real AWS
Root cause was a one-line divergence on the instance side: the systemd unit ran
spored run, but the daemon is the baresporedinvocation — the unknown subcommand made spored exit non-zero and the unit crash-looped, so it never enforced the TTL. Fixed in #20 by matching the Go bootstrap's unit byte-for-byte.Re-ran the unattended observation (t4g.nano, 5-min TTL, us-east-1,
spored-instance-profile):Stayed running right to the deadline, then spored wound it down ~35s later with no action from me. Confirmed
terminated, no orphaned instances/volumes.All acceptance items met:
spored-instance-profile: DescribeTags/DescribeInstances/CreateTags + Terminate/StopInstances)SPORE_DNS_SIGV4/signing key isn't compiled into spawn-ts), and the browser-side S3 download vs Go's launcher — instance-side unit is now identical.Closing. Total spend across all validation runs today: under 3¢.
release: 0.3.0 (#21)