Request payload limit with AWS API Gateway

48,693

Solution 1

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/

Solution 2

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

Share:
48,693

Related videos on Youtube

Suhail Gupta
Author by

Suhail Gupta

"There's nothing more permanent than a temporary hack." - Kyle Simpson "The strength of JavaScript is that you can do anything. The weakness is that you will." - Reg Braithwaite I am on internet Twitter @suhail3 E-mail [email protected]

Updated on September 23, 2020

Comments

  • Suhail Gupta
    Suhail Gupta over 3 years

    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.

  • Suhail Gupta
    Suhail Gupta over 6 years
    Am looking to read the official documentation. Google search gives out different answers to same question
  • Vijayanath Viswanathan
    Vijayanath Viswanathan over 6 years
    @SuhailGupta there will not be an official documentation for this as this will be a work aorund to solve existing size limitage.
  • Suhail Gupta
    Suhail Gupta over 6 years
    What does it mean?
  • Vijayanath Viswanathan
    Vijayanath Viswanathan over 6 years
    @SuhailGupta If you are looking for official documents for limit usage then I have updated the answer. The solution document link I have provided in just a work around to acheive size limitage problem in a different way, which is unofficial document
  • Mojimi
    Mojimi over 4 years
    The most common solution is to have a api route with a lambda that generates a presigned s3 upload link. Then hook a lambda as a s3 event to read that file as a payload/json