Uh oh!
There was an error while loading. Please reload this page.
fix(sst): use bundle for the prebuilt Rust Lambda, not handler - #12
Merged
Conversation
Every route of a SmoothAgentApi deploy failed with: Error: Runtime not found: provided.al2023 `args.handler` is a PREBUILT artifact directory — the cargo-lambda output holding `bootstrap`. Passing it as `handler` makes SST try to BUILD it, and SST dispatches its builder on the runtime string. There is no builder registered for the literal `provided.al2023`: SST expects `rust` or `go` as the BUILD input and maps those to that Lambda runtime itself. So the value is a valid Lambda runtime and an invalid SST build runtime, and the two are easy to conflate. `bundle` is the documented way to say "I built this myself, skip bundling" — with `handler` then naming the entrypoint inside it (`bootstrap`, which is also the crate's [[bin]] name). This failed in a way that pointed at the wrong layer: each route created its log group and IAM role successfully FIRST, so the run looked like a permissions problem right up until the build step. Found deploying smooth-operator's serverless flavor for the first time (SmooAI/smooth-operator#559) — the path had never actually been run. Typecheck is unchanged: 93 pre-existing errors on main (the `sst` ambient globals a library checkout cannot resolve), 93 with this change.
|
Uh oh!
There was an error while loading. Please reload this page.
brentrager added a commit
that referenced
this pull request
Aug 31, 2026
Patch: the Rust Lambda bundle fix (#12). SmoothAgentApi could not deploy at all before it — every route failed with 'Runtime not found: provided.al2023' because the prebuilt artifact dir was passed as `handler` instead of `bundle`.
brentrager added a commit
to SmooAI/smooth-operator
that referenced
this pull request
Aug 31, 2026
0.2.0's SmoothAgentApi passed the prebuilt cargo-lambda artifact dir as `handler`, so SST tried to BUILD it and failed every route with 'Runtime not found: provided.al2023' — there is no SST builder for that string (it expects `rust`/`go` as the build input and maps them to it). 0.2.1 uses `bundle` + `handler: 'bootstrap'`, which is SST's documented 'I built this myself' path. SmooAI/deploy#12. Lockfile regenerated with --config.inject-workspace-packages=false so it carries no trace of my local pnpm setting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every route of a
SmoothAgentApideploy fails with:The bug
args.handleris a prebuilt artifact directory — thecargo lambdaoutput holdingbootstrap. Passing it ashandlermakes SST try to build it, and SST dispatches its builder on the runtime string.There is no builder registered for the literal
provided.al2023. SST expectsrustorgoas the build input and maps those to that Lambda runtime itself:So
provided.al2023is a valid Lambda runtime and an invalid SST build runtime — easy to conflate, and the arg is namedruntimefor both.The fix
bundleis SST's documented way to say "I built this myself, skip bundling", withhandlernaming the entrypoint inside it:Why it was slow to spot
It failed at the wrong-looking layer. Each route successfully created its CloudWatch log group and IAM role first, so the run read as a permissions problem right up until the build step — and the deploy had genuinely hit four real IAM denials before this one, which made a fifth entirely plausible.
Provenance
Found deploying smooth-operator's serverless flavor for the first time (SmooAI/smooth-operator#559). That path had never actually been run end to end, which is also how it shipped with a wrong
ARTIFACT_DIRand a config thatsst installrejected outright.Verification
Typecheck is unchanged: 93 pre-existing errors on main (the
sstambient globals a library checkout can't resolve), 93 with this change — verified by stashing and re-running, not assumed.🤖 Generated with Claude Code