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
--command >256 chars fails launch: stored in EC2 tag (256-char cap); use user-data or fail fast client-side #246
spawn launch --command "<cmd>" fails at RunInstances when the command string exceeds 256
characters, because spawn stores it verbatim in an EC2 tag (spawn:command) and EC2 caps tag
values at 256 chars:
Error: failed to launch instance: InvalidParameterValue: RunInstances ...
api error InvalidParameterValue: Tag value exceeds the maximum length of 256 characters
(command here is 317 chars → hard fail; nothing launches)
Why it bites
Any non-trivial bootstrap command — fetch-a-script-and-run-it with a handful of env vars (a very
common pattern, and the one spawn's own docs encourage) — easily exceeds 256 chars. The failure
is a hard RunInstances error, not a warning, so the launch is lost.
Suggested fixes
Don't put the full command in a 256-char-capped EC2 tag. Options: pass it via user-data
(where the spored bootstrap already lives — effectively unlimited), or store it in SSM Parameter
Store / a spawn-managed S3 object and put only a short reference in the tag, or chunk it across
tags and reassemble.
At minimum, validate length client-side and fail fast with an actionable message
("--command is N chars; EC2 tag limit is 256; pass a script reference instead") rather than a
raw AWS tag error after IAM/SG setup.
Workaround
Keep --command short (just fetch+run a script); push all parameters into the script itself
(read from instance tags, an S3 config object, or bake per-instance values into the fetched
script). That's what we're doing for the fleet launch.
Context
Hit launching a fan-out fleet of g5.4xlarge for SAM inference (BuckAI/fieldwork): each instance's
command set its fleet shard offset + checkpoint config via env, which pushed past 256 chars.
Activity
fix: keyless status over SSM (#222), --command >256 via user-data (#214/
scttfrdmn commentedon Jun 25, 2026
Fixed in #250 (v0.68.0):
--commandembedded in user-data (bootstrap prefers it over the tag); oversized command no longer written to the tag.