Using Post API to upload file to AWS storage and our API running on AWS Elastic Beanstalk( file size is 3 MB ). But when uploading file "413 Request Entity Too Large" errors occurred. I've done quite a bit of research and also refer following link but issue remain same. Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk
Asked
Active
Viewed 1,566 times
0
-
Current answer for that link is appliable for Amazon Linux 1. Please check https://stackoverflow.com/a/61943622/7532917 whether it will solve your issue. – Jijo Cleetus Sep 12 '20 at 08:29
1 Answers
0
The link you've provided works only for EB platform based on Amazon Linux 1.
Since you maybe using Amazon Linux 2 you should be using different files for setting nginx. For AL2, the nginx settings should be in .platform/nginx/conf.d/
, not in .ebextentions
as shown in the docs.
Therefore, you could have the following .platform/nginx/conf.d/myconfig.conf
with content:
client_max_body_size 5M;

Marcin
- 215,873
- 14
- 235
- 294
-
Thanks for your reply , i have tried your solution but still end up with the same error 413 (Request Entity Too Large) – sanket patil Sep 14 '20 at 13:48
-
@sanketpatil Can you provide details of your setup? And please double check file names used. – Marcin Sep 14 '20 at 22:36