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
client.Launch sends empty KeyName to RunInstances; headless/SSM launch fails with 'keyPairNames should not be blank' #130
After the user-data base64 fix (#127), the headless launcher.Provision path now fails one step later at RunInstances:
InvalidParameterValue: Invalid value '' for keyPairNames. It should not be blank
client.Launch unconditionally sets KeyName: aws.String(launchConfig.KeyName) (client.go:299). When KeyName is empty — the normal headless case, where lagotto launches with no SSH key and relies on SSM — this sends an empty-but-present KeyName string, which EC2 rejects. An omittedKeyName is valid (launch with no key pair); an empty-string KeyName is not.
This is the lagotto#19 design intent, per the closing comment on that issue:
SSM-only is fine (the spored role attaches AmazonSSMManagedInstanceCore), so no on-disk SSH key is required in Lambda.
So launcher.Provision deliberately doesn't set up an SSH key — but client.Launch then can't express "no key pair" because it always passes the field.
Reproduction
# spawn v0.44.1, lagotto v0.39.1
lagotto watch g5.12xlarge --action spawn --spawn-config sam.yaml --regions us-west-2 --ttl 7d
lagotto poll --verbose
# → Match found → base64 OK now → launch: InvalidParameterValue: Invalid value '' for keyPairNames
Fix
In client.Launch, only set KeyName on the RunInstancesInput when non-empty:
(Currently client.go:299 sets it inline unconditionally.) Omitting the field is the AWS-supported way to launch without a key pair, which is exactly what the SSM-only headless path needs.
Impact
Second blocker (after #127) on the lagotto#19 "watch → launch → run → stop" flow. With both fixed, a headless capacity-triggered launch should finally succeed end-to-end. Found in the same BuckAI/fieldwork Tutorial 01 scenario (auto-launch SAM inference on g5.12xlarge when us-west-2 capacity appears).
Activity
fix(launch): omit KeyName from RunInstances when unset (#130) (#131)
docs(changelog): promote Unreleased -> 0.44.2 (#130 fix) (#132)
test(e2e): make the live Provision test a proper Tier 2 test
test(e2e): Tier 2 test for launcher.Provision (catches the #127/#130 …