Increase the payload size limit of API Gateway

0

Hi,

While I am able to send a relatively smaller CSV file through the API Gateway to S3 it's successful. But when trying to send a moderately larger CSV file through the created API Gateway I receive the following error; 'HTTP content length exceeded 10485760 bytes'

Is it possible to increase the API gateway payload size limit in AWS?

3 Answers
3

No, it can not be increased, API Gateway quotas for configuring and running a REST API.

You can use a different architecture to get around this limitation but still use API Gateway. See: Patterns for building an API to upload files to Amazon S3

profile pictureAWS
EXPERT
kentrad
answered 8 months ago
profile picture
EXPERT
Steve_M
reviewed 8 months ago
profile picture
EXPERT
reviewed 8 months ago
0

According to this Payload size is 10 MB and can not be increased. https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html Enter image description here

Instead of posting the data directly to the API endpoint, you can generate a PreSigned S3 URL and upload using it. If any subsequent processing of the data is needed you will use S3 notifications and Lambda after the upload is completed.

Hope this helps.

AWS
answered 8 months ago
  • If there are any further questions feel free to ask. If this answer is satisfactory to you please mark it as accepted. Thanks!

0

API Gateway has a hard limit of 10MB for the payload size. It can't be increased.

The recommendation in these cases is to generate an S3 pre-signed URL and use it to upload the file to S3 and process it from there.

profile pictureAWS
EXPERT
Uri
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions