Skip to content

User data: fetch the bootstrap from S3 behind a small verifying stub, removing the 16 KiB ceiling (follow-up to #1246) #1274

Closed

Description

@scttfrdmn

Follow-up to #1246. PR #1273 strips comments from the bootstrap's user data, which takes a trivial task from 14,711 to 9,149 of EC2's 16,384 bytes (gzipped). That frees about 5.5 KB, but the limit is still there. The bootstrap is still about 7.3 KB of real script, and each feature added to it comes out of a task's budget. The 8 KiB budget test added in #1273 makes that growth deliberate rather than accidental, but it does not stop it.

Option 1 from #1246 would remove the ceiling: put only a small stub in user data, and have it fetch the full bootstrap, or the task wrapper, from S3 and verify it before running it.

  • Stub: fetch, verify, exec, in about 1 KB.
  • Body: staged per launch next to the task's records, or published per release next to spored.
  • Verification: the KMS signature the spored install already checks (pkg/sporedinstall), or a sha256 baked into the stub. The stub is user data, so it is as trusted as today's bootstrap.
  • Cost: one S3 GET at boot, and the instance role needs read access to wherever the body lives.

Other savings available now, smaller and independent:

  • The task wrapper (about 1.4 KB gz) and the terminal-flush hook (about 0.9 KB gz) are spawn-generated, but shellmin.Strip is not applied to them yet. The wrapper embeds the user's command, so only its template text could be stripped.
  • cmd/app.go and lambda/pipeline-orchestrator embed sporedinstall.VerifiedInstallFunc() in their own user data unstripped. It is 2.9 KB gz commented, 1.3 KB stripped.

Activity

  1. modified the milestone: Later on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions