I am using Golang with elastic Beanstalk and I find that I am able to upload files up to 1 MB and the ones bigger than that fail with the error client intended to send too large body: 1749956 bytes the bytes obviously depend on the file size . I have been reading this post Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk and I changed my code created a file 01_nginx.config under the ebExtensions and put the following in it and I try to upload a video of 3 MB and it still gives that error, any suggestions ? I am new to this
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 20M;
Sign in toAWS Console. Go to EC2 Services. On the left panel, click on the Load Balancing > Load Balancers. In the top panel, select the Load Balancer for which you want to change the idle timeout.
Elastic Beanstalk fully manages this load balancer, taking care of security settings and of terminating the load balancer when you terminate your environment.
When your environment uses a Classic Load Balancer, Elastic Beanstalk configures it by default to listen for HTTP traffic on port 80 and forward it to instances on the same port. To support secure connections, you can configure your load balancer with a listener on port 443 and a TLS certificate.
I have tried all .ebextensions method of adding implementation level configuration for rails and it didn't help me in the latest Amazon Linux AMI. For the latest Amazon Linux AMI You need to follow this structure to increase the upload size. You need to follow this structure to increase the upload size limit.
Add the below folder setup in the root level of your project folder.
Folder structure (.platform/nginx/conf.d/proxy.conf)
.platform/
nginx/
conf.d/
proxy.conf
Add this line to proxy.conf (Inside .platform/nginx/conf.d/ folder)
client_max_body_size 50M;
commit this file and deploy again using eb deploy
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With