Http response code: 413
See original GitHub issueI’m having 2 weeks conversation with AWS support, but without any results, hope somebody here will help me figure out what is going on.
Initial problem: for some images I’ve receive Internal server error
with [ERROR] [1583405456446] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 413.
on CloudWatch.
But, also I found today, that behaviour is much more odd, that I thought 2 weeks ago.
this link opens for Chrome, Firefox, Opera browsers (on different devices), but doesn’t for Safari.
Looks like this image has been processed by CloudFormation (main question how?, because now I receive 413) and saved on CloudFront. But for some browsers it receives from the CloudFront, but for Safari it tries to proceed it again.
Of course main goal to fix 413 error, or at least found any workaround. I’m using latest template https://s3.amazonaws.com/solutions-reference/serverless-image-handler/latest/serverless-image-handler.template
Any thoughts? Will be very appreciate for any ideas.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:18 (8 by maintainers)
Top GitHub Comments
@vitalinfo I’m sorry for your inconvenience. I think the reason why you got 413 error is that your image size is pretty big, so it could exceed the AWS Lambda’s invocation payload limit.
We will review the workaround or solution for this issue.
Thanks for waiting. We’ve released v5.1.0 to mitigate this issue. The new version will throw an proper error message once your images exceed the Lambda limit.
@vitalinfo @demsey2 since we are using API Gateway Lambda proxy, we are encoding the image binary which causes bigger payload than the original image size. That’s why you’ve faced an issue with images lower than the Lambda limit.