-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Support large event payload input to Lambda #188
Comments
+1 |
1 similar comment
+1 |
According to this page: http://docs.aws.amazon.com/lambda/latest/dg/limits.html, when invoking an Event, there is a 128K size limit on the payload. |
Interesting bug - thanks @GeoffreyBooth for the easily reproducible test case. We pass the event data (the contents of I need to investigate this some more. |
+1 |
docker-lambda supports the |
+1 |
Just added support to |
I am a bit confused by this. Should I be setting |
Is the alternate input to docker lambda going to be integrated into SAM? |
@frob Did you figure out how to properly set and use that environment variable? I'm running into this issue as well and setting |
I have not figured it out. For larger api tests I have been publishing to aws for the test. |
@frob have been forced to do the same. |
something new ? |
I'm also interested if there is a plan to fix this. As I understand it this is not an AWS limit since for synchronous calls the payload limit is 6 MB. But instead this is related to something with the Docker integration This problem will be triggered by binary files larger than around 95 kB since those will be Base64 encoded behind the scene which increases the file size with factor 1.33 which will then trigger the bug with the 128 kB payload limit. |
Is there a PR out / plan to fix this? This issue has been open since 2017 |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Is there any update? Or some intermediate solution? |
uploading files through sam cli seems to be a dead option. Way too much pain and nothing helps. Also no support given |
I wrote some solution to make it working. |
@PaulMaddox is there any update on this? I also ran into this issue. It would be nice at the very least to get a more informative message from SAM than
Perhaps for now SAM can just look at payload size and determine if it's too large to send over the Docker interface, then error with an informative message like "we're sorry, due to limitations with Docker we do not allow payloads larger than XX KB". This may not be a perfect solution, but it would at least be helpful in this case. |
Sorry @boompig, I am no longer actively involved in the development of SAM CLI, and haven't been for a few years (since it was rewritten in Python). Hopefully one of the SAM CLI team can give an update. |
Invocation payload (request and response) | 6 MB (synchronous) |
I'm also suffer from this issue severely. I cannot post a 107KB file. |
Having the same issue. Does anyone know a workaround? |
Also having this issue. |
@moelasmar, thanks for getting this fixed! |
v1.16.0 is released, please reopen if the issue still persists |
I’m trying to build an API endpoint lambda function that accepts an uploaded binary file.
Try this:
and then in a new shell, from the
aws-sam-local
folder:The response I get to
curl
is{ "message": "Internal server error" }
.Back in the first shell, I see this output:
If I remove the
--data-binary
, to send a POST request without a body, I get the expectedOK
response.If I change
--data-binary '@./sam-banner.png'
to--data-binary '@./README.md'
, replacing the 129 KB file with a 21 KB one, I also get theOK
response. So I gather that there must be some (fairly low) limit on request size? Is there some way I can increase it?Also, I feel like
aws-sam-local
should print an informative error message, rather than (I presume) passing invalid parameters onward to Docker for it to throw an exception on.The text was updated successfully, but these errors were encountered: