I know this might be considered a duplicate of: Customizing Nginx Configuration in AWS Elastic Beanstalk (and other questions), but I was unable to make my code work with any of the proposed solutions.
This is how my config.yml file looks like (xxx = environment name):
branch-defaults:
master:
environment: xxx
environment-defaults:
xxx:
branch: master
repository: xxx
global:
application_name: xxx
default_ec2_keyname: null
default_platform: arn:aws:elasticbeanstalk:eu-west-1::platform/Node.js running on
64bit Amazon Linux/4.3.0
default_region: eu-west-1
instance_profile: null
platform_name: null
platform_version: null
profile: null
sc: git
workspace_type: Application
Then adding:
http:
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
http {
client_max_body_size 20M;
}
container_commands:
01_reload_nginx:
command: "service nginx reload"
For allowing bigger payloads and trying to restart nginx to accept the changes after deploy. However, even though it seems the accepted method it is not working in my code. Everything else works perfectly fine with smaller files than 1mb.
Thanks for your help!