Fix “413 request entity too large” Nginx error on AWS Elastic Beanstalk via EBS Configuration
Do Not Do any Manual changes on EBS, configure your nginx via EBS configuration setup
Since the EBS is auto scaling we can’t increase the Size and request time out manually so we have to add conf file in you source code which automatically include in the nginx configuration in EBS
here we can saw that “ include conf.d/elasticbeanstalk/*.conf; ” which include any configuration we have written inside the folder.
Here am creating a new configuration files for 01_client_max_body_size shown in above image, if we put 01 in front it will include this file first.
create a directory in your source code root folder,
.platform/nginx/conf.d/elasticbeanstalk/
create a new file which has any name you can give here am giving 01_client_max_body_size.conf
Insert the below code to the file and save it.
client_max_body_size 80M;
Then save to run the AWS Code Pipeline as connected to github deploy or Upload the zip code to EBS