{{ message }}
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Add Lambda tests for large response handling#10229
Merged
Merged
Conversation
0b79a41 to
83edf96
Compare
83edf96 to
d0b1e7d
Compare
joe4dev
reviewed
Feb 13, 2024
joe4dev
left a comment
Member
There was a problem hiding this comment.
Tests look good 👍
just nits not blocking a merge
| ) | ||
| # SEMI-PUBLIC: not actively communicated | ||
| LAMBDA_LIMITS_MAX_FUNCTION_PAYLOAD_SIZE_BYTES = int( | ||
| os.environ.get("LAMBDA_LIMITS_MAX_FUNCTION_PAYLOAD_SIZE_BYTES", 6 * 1024 * 1024 + 100) |
Member
There was a problem hiding this comment.
FYI: There are even more different quotes: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
just in case we run into these in the future ...
6 MB each for request and response (synchronous)
20 MB for each streamed response (Synchronous. The payload size for streamed responses can be increased from default values. Contact AWS Support to inquire further.)
256 KB (asynchronous)
joe4dev
reviewed
Feb 13, 2024
joe4dev
approved these changes
Feb 13, 2024
joe4dev
left a comment
Member
There was a problem hiding this comment.
LGTM 👍
(missed another json.loads 😅 )
| ) | ||
| snapshot.match("invoke_result", result) | ||
|
|
||
| # second invoke to make sure we didn't break further invocations |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Motivation
We didn't really cover the case where the returned response from the lambda handler is over the defined 6MB limit and received issue reports that this lead to the functions being in a broken state and timing out instead of properly failing immediately.
Changes
LAMBDA_LIMITS_MAX_FUNCTION_PAYLOAD_SIZE_BYTESto modify the maximum payload size & corresponding testv0.1.27-preTODO