Skip to content

Instantly share code, notes, and snippets.

@pdrok
Last active December 4, 2023 22:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdrok/24d94ae412d2e29edfef6d0b898b0bd9 to your computer and use it in GitHub Desktop.
Save pdrok/24d94ae412d2e29edfef6d0b898b0bd9 to your computer and use it in GitHub Desktop.
How to fix a "413 request entity too large" error on AWS Elastic Beanstalk

The .conf files directory have to be .platform/nginx/conf.d/elasticbeanstalk

Create a new file called .platform/nginx/conf.d/01_client_size.conf and paste in the following:

client_max_body_size 20M;

You don't need to restart the nginx manually, when you deploy it restart the services.

Thanks

Source

@marcoaragonrojas
Copy link

Works for me. Thanks!

@pfcodes
Copy link

pfcodes commented Nov 3, 2022

👍

@voratham
Copy link

voratham commented May 4, 2023

it not work for me, i use Docker platform

@pdrok
Copy link
Author

pdrok commented May 4, 2023

If you are using Docker inside Elastic Beanstalk and using a reverse proxy like Nginx, you will also need to configure Docker accordingly. I had to configure a container with Nginx on AWS Fargate due to a similar issue.

@tavoohoh
Copy link

tavoohoh commented Dec 4, 2023

Working for a nest js project! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment