Suhail Gupta
Suhail Gupta

Reputation: 23256

Request payload limit with AWS API Gateway

What is the request-payload limit with AWS API-Gateway?

I need to send a JSON payload with base64 encoded files and some other parameters to API Gateway, that will then pass on the payload to AWS Lambda.

I could not find AWS documentation regarding this.

Upvotes: 41

Views: 90517

Answers (3)

Red Boy
Red Boy

Reputation: 5729

One Interesting thing that I have done which has solved my problem, I think it will be worth sharing because it may solve some use cases for others.

I know my case was bit different where client data in POST.

method POST
URL something/createObj

This API was invoked by not human beings but a warehousing system for sending logistics consignments.

This is how we have implemented.

  1. Instead of sending data in body send it in file attachment.
  2. The data Zip compress that reduces the size approx 90%.
  3. The service then unzip and process it and return back the response again in file attachment as it sends back the label pdf again zip compressed.
  4. The receiver again unzip and process further.

Very interesting case to workaround api gateway and lamdba limits. :)

Upvotes: 0

Vijayanath Viswanathan
Vijayanath Viswanathan

Reputation: 8541

Maximum payload to API gateway is 10 MB and maximum payload for Lambda is 6 MB, which cannot be increased.

Please see API gateway payload limits here

Please see Lambda payload limits here

But there is an alternative way (a work around) to achieve the same by uploading data to an S3 bucket if your size is more that 10 MB. Please read the below article for details (Unofficial document):

https://sookocheff.com/post/api/uploading-large-payloads-through-api-gateway/

Upvotes: 68

jens walter
jens walter

Reputation: 14029

The API Gateway has a request size limit of 10MB.

Amazon API Gateway Limits, Pricing and Known Issues

The more important limit in your scenario is the lambda size limit which is only 6 MB.

AWS Lambda Limits

Upvotes: 9

Related Questions