Add this at the bottom of your app.yml in custom commands, then rebuild:
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /client_max_body_size.+$/
to: client_max_body_size 1000m;