Repository navigation
Conversation
AWS Lambda rejects deployment packages larger than 250 MB once unzipped. osls zipped and uploaded such packages anyway, and the deployment only failed minutes later, when CloudFormation created the function: "Unzipped size must be smaller than 262144000 bytes". Add up the size of the files before zipping them and fail right away, listing the largest top-level files and directories of the package and pointing to `package.patterns`. This applies to service, function and layer packages, for both `package` and `deploy`. The check is skipped when a plugin overrides getFileContent() or getFileContentAndStat(), as the zipped content can then differ from the files on disk. Layers also count toward the limit, but the unzipped size of external layers is not known locally: only packages that are too large on their own are rejected. Claude-Session: https://claude.ai/code/session_01Awk33iZ9mDSg1xgSAPkgGK
mnapoli
marked this pull request as draft
September 27, 2026 10:15
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 free
to 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.
Backport of #459 to 3.x: same change, with the docs link pointing to the 3.x packaging guide.
Tested the same way.
npm testpasses (3511 tests, the only failure is an uncaughtgetRandomValueserror on Node 26 that also happens without this change). The packaging integration tests and the large zip smoke test pass. On the real 305 MB service,serverless deployfails in under a second with the new message, and a normal-size service still packages.