1

I just figured out that my flask app cannot handle a certain amount of file size while uploading through an http form :

HTTP content length exceeded 10485760 bytes.

How can I raise this limit ?

ti7
  • 16,375
  • 6
  • 40
  • 68
John doe
  • 3,680
  • 7
  • 31
  • 65
  • You may be able to set a higher `MAX_CONTENT_LENGTH` if that's where the limitation is https://stackoverflow.com/a/31874493/4541045 - please add more information about your network stack (ie. are you using nginx -> gunicorn -> Flask or some other layout?) – ti7 Mar 16 '21 at 19:59
  • It seems the problem is related to AWS Lambda. I've tried the same request with my app running locally and there was no problem. However when I deploy it on lambda I get this error. – John doe Mar 16 '21 at 20:05

1 Answers1

1

The size limit shared by you looks like of API gateway i.e. around 10MB. (API Gateway limits)

AWS Lambda payload size limit is 6MB.

Both of these limits cannot be changed. I was not able to find any limitations for ALB so you can think of using ALB in your application.

nirvana124
  • 903
  • 1
  • 9
  • 12