Skip to content

fix: Running in Lambda has inherent 6mb request size limit - #889

Merged
matteovivona merged 4 commits into
ducktors:mainfrom
yhay81:agent/issue-677
Sep 1, 2026
Merged

matteovivona merged 4 commits into
ducktors:mainfrom
yhay81:agent/issue-677

Conversation

@yhay81

@yhay81 yhay81 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #677.

Summary

Running in Lambda has inherent 6mb request size limit

Validation

  • Mechanical gate: +6/-0, quality and tests passed
  • Adversarial review: approved

🤖 AI-authored PR, operated by @yhay81.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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 a 413 Payload Too Large warning. (+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.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏

Comment thread docs/running-in-lambda.md Outdated

@matteovivona matteovivona left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up. One correction needed before merge, plus three things worth adding while we are here.

  1. src/aws-lambda.ts:8 sets enforceBase64: (_) => true, and Lambda Function URLs base64-encode binary request bodies (Turbo uploads with application/octet-stream). Base64 adds about 33%, so a 6 MB invocation payload carries only ~4.5 MB of artifact bytes.

  2. The sentence names the response limit but then says only that artifacts "cannot be uploaded". With enforceBase64 on the response path, a GET of an oversized artifact fails the same way. Worth stating both directions.

  3. 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.

Comment thread docs/running-in-lambda.md Outdated
@matteovivona
matteovivona self-requested a review September 1, 2026 10:19
@matteovivona

Copy link
Copy Markdown
Contributor

@all-contributors add @yhay81 on docs

@allcontributors

Copy link
Copy Markdown
Contributor

@matteovivona

I've put up a pull request to add @yhay81! 🎉

@matteovivona
matteovivona merged commit b6614a7 into ducktors:main Sep 1, 2026
17 checks passed
matteovivona pushed a commit that referenced this pull request Sep 1, 2026
## [2.12.2](v2.12.1...v2.12.2) (2026-09-01)

### Bug Fixes

* address review comment on [#889](#889) ([71930c5](71930c5))
* Running in Lambda has inherent 6mb request size limit ([#677](#677)) ([6cc0c1d](6cc0c1d))
@matteovivona

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.12.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running in Lambda has inherent 6mb request size limit

2 participants