Nginx blocks file uploads over 1MB by default, returning 413 Request Entity Too Large.
The fix depends on which Elastic Beanstalk platform you're using.
Java platform → use .ebextensions/nginx.config (see this thread)
Docker platform → keep reading.
If you're deploying by pushing an image to Docker Hub and uploading only Dockerrun.aws.json to EB, use the .platform directory to override Nginx config.
Create .platform/nginx/conf.d/proxy.conf at your project root:
client_max_body_size 100M;For Mac users: Don't right-click → Compress. It adds hidden __MACOSX/ files that break the deployment. Use the terminal:
zip eb-deploy.zip Dockerrun.aws.json .platform/nginx/conf.d/proxy.confUpload eb-deploy.zip to your EB environment. Elastic Beanstalk will automatically pick up the config and apply it to Nginx.
your-project/
├── Dockerrun.aws.json
└── .platform/
└── nginx/
└── conf.d/
└── proxy.conf
Comments (0)
Loading comments...