fix: Running in Lambda has inherent 6mb request size limit - #889
Conversation
There was a problem hiding this comment.
ℹ️ Minor suggestions only.
Reviewed changes
- Lambda 6 MB payload-limit warning: adds a
> **Warning:**blockquote to the top of the Lambda deployment guide documenting the 6 MB synchronous invocation payload limit, that artifacts larger than 6 MB cannot be uploaded, and that Turbo reports a413 Payload Too Largewarning. (+6 lines, docs-only, resolves #677.)
The core facts check out: the 6 MB synchronous request/response quota and the cited AWS docs page are correct, and 413 Payload Too Large matches the error the issue reporter actually observed from a Function URL. One inline suggestion on the effective artifact-size boundary.
DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏
There was a problem hiding this comment.
Thanks for picking this up. One correction needed before merge, plus three things worth adding while we are here.
-
src/aws-lambda.ts:8setsenforceBase64: (_) => true, and Lambda Function URLs base64-encode binary request bodies (Turbo uploads withapplication/octet-stream). Base64 adds about 33%, so a 6 MB invocation payload carries only ~4.5 MB of artifact bytes. -
The sentence names the response limit but then says only that artifacts "cannot be uploaded". With
enforceBase64on the response path, aGETof an oversized artifact fails the same way. Worth stating both directions. -
Anyone who hits this will reach for
BODY_LIMIT(docs/environment-variables.md:28, default 100 MB). It does nothing here. AWS rejects the request before Fastify sees it. One sentence saves that detour.
4)TURBO_CACHE_READ_URL (docs/environment-variables.md:34) answers reads with a 302 to a CDN instead of streaming through the server, which removes the response-side limit entirely. Writes still hit the 6 MB cap, but it is a genuine partial fix this repo already supports.
|
@all-contributors add @yhay81 on docs |
|
I've put up a pull request to add @yhay81! 🎉 |
|
🎉 This PR is included in version 2.12.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |

Fixes #677.
Summary
Running in Lambda has inherent 6mb request size limit
Validation
🤖 AI-authored PR, operated by @yhay81.