- Newest
- Most votes
- Most comments
Hello,
Thank you for your query.
I understand that you have deployed a spring boot REST API on Elastic Beanstalk however when using the API to upload a file in S3 bucket, you are getting the error saying that the request body is too large.
Proceeding further, if you are using Nginx proxy for the application, so be default the max size for client request is set to 1MB and you will get an error when a larger file is uploaded.
From the error itself we can see that a file of size 3527163 bytes (~ +3Mb) is sent and hence the error. Therefore, can you please confirm which proxy you are using, and refer this link for increasing the request body size. https://repost.aws/knowledge-center/elastic-beanstalk-nginx-configuration
If you are using Apache, you can follow the same approach to increase the limits as well. [] Extending Elastic Beanstalk Linux platforms - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html
Hoping that the above helps. Thank you.
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 3 days ago
I've tried your solution like this:
1- created myapp/.platform/nginx/conf.d/client_max_body_size.conf. client_max_body_size 50M; in my application source code using IntelliJ IDE 2- then I built jar file in target directory using "mvn clean install" 3- then uploaded the jar file to elastic beanstalk.
But still the problem isn't solved