I tried the option of adding.platform or .ebextensions folder to the zip file to modify the ngnix setting to allow more than 1MB file but it did not work. I deployed my spring boot as a jar in Elastic Beanstalk. Can you please help me? Appreciate it. Thank you.
Update on the structure. I have used the following directory structures:
1) root of the zip folder
- .platform
- ngnix - conf.d - ngnix.conf
- application.jar the contents of proxy.conf are: client_max_body_size 100M;
2)root of the zip folder
- .ebextensions
- ngnix - myconf.conf
- application.jar
The content of the conf file myconf.conf:
files: "/etc/nginx/conf.d/proxy.conf": mode: "000755" owner: root group: root content: | client_max_body_size 100M;
I have referred to the following links:
- https://medium.com/innovation-res/how-to-configure-aws-ebs-to-handle-large-files-10411b9cecf0
- https://dev.to/rasoolk16/elastic-beanstalk-update-media-upload-size-53go
- https://harishkm.in/2020/08/06/uploading-large-files-to-aws-elastic-beanstalk-fails-with-http-413-request-entity-too-large/
Thank you, Jeelani
Update:
I've tried keeping the config file directly under .ebextensions and used the following formats to try it out.
- files: "/etc/nginx/conf.d/proxy.conf": mode: "000755" owner: root group: root content: | client_max_body_size 100M;
Noticed the following error:
The configuration file __MACOSX/.ebextensions/._01_nginx.config in application version showkase-source-20 contains invalid YAML or JSON. YAML exception: Invalid Yaml: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1, JSON exception: Invalid JSON: Unexpected character (�) at position 0.. Update the configuration file. 2) client_max_body_size 100M;
Let me go through the links you have provided and see what am I doing wrong. Thank you. Will keep you posted. But with either of these formats, I don't see the file appearing in /var/app/current. I see only the applicaiton.jar and Procfile.
Contents of config file:
files:
"/etc/nginx/conf.d/01_proxy.conf":
mode: "000644"
owner: root
group: root
content: |
client_max_body_size 20M;