Jagdish Idhate
Jagdish Idhate

Reputation: 7742

API Gateway: JSON 5+ MB Gives error "413, Request Too Long"

I have sample json which is more than 5MB,

When not using lambda integration & try to do post request

413 Request Too Long

If I use lambda integration it gives

502 Internal server error

Request does not reach to my lambda function

In response headers I'm getting following error:

X-Cache: Error from cloudfront

If I use mock service it works & gives 200 response.

As per Api documentation it supports max 10MB.

I want to get this json in my request.

Any solutions?

Upvotes: 6

Views: 16160

Answers (1)

jens walter
jens walter

Reputation: 14029

I think what you are seeing is not the limit of the API Gateway, but rather the request limit of the Lambda function. Those have a limit of 6MB for the whole input. So depending on you input mapping 5+MB payload could result in a larger payload for the Lambda request.

AWS Lambda Limits

Upvotes: 13

Related Questions