aws-elastic-beanstalkAmazon(AWS) Hosting 

How to solve 413 request entity too large in AWS elastic beanstalk solution-1

To solve 413 request error in AWS elastic beanstalk with node.js application follow the below steps.

Note: this solution currently tried with the Nginx server but works with apache too. This method is a custom hack to increase the upload file size without using awsebcli.

step1: In your node.js application root folder create folder name called .ebextensions.

step2: Inside this folder create a file with any filename ending with “.config” extensions example: nginxfile.config.

step3: Now open the created file and copy-paste the below-mentioned code into file and save.

container_commands:
  01_reload_nginx:
    command: "service nginx reload"
files:
    "/etc/nginx/conf.d/proxy.conf":
      mode: "000755"
      owner: root
      group: root
      content: |
        client_max_body_size 25M;

step4: At last zip your application or push to git to upload the file to the AWS elastic beanstalk, it will automatically on detecting .ebextensions folder server do the rest of its job.

Note: If above solution does not work, then try second method here

now try uploading the file if it works then fine else you might need to rebuild the environment to work flawlessly.

If you have any problem with 413 error, let me know in the comments below.

Also Read:  How To Install Linux, Apache, MySQL, PHP (LAMP) stack on AWS Ubuntu

Related posts