Node-RED 3.0.2 on Elastic Beanstalk : 413 "Request entity too large" error on palette deploy

I'm running Node-RED 3.0.2 on an Elastic Beanstalk environment (Amazon Linux 2 / Node 16)

After adding a fair amount of flows, I began to encounter deploy failures in the admin palette with error
"413 : Request entity too large"

At first, this error only appeared when deploying a large number of nodes; now it appears when deploying only a dozen or so.

I made sure that the deploy button is set to "only changed nodes"

I have read the below thread on a similar topic:

and adjusted
apiMaxLength
in settings.js accordingly, however this did not fix the problem;

in addition, I'm not sure where to put the additional suggested lines:

app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));

(I don't think it's in settings.js because I can't find the "RED.init" line referenced in that thead, in the settings.js file,
and since configurations added to the underlying EC2 instance don't survive Beanstalk replacement, I figure it can't be in the instance's /var/app files

How can I prevent this 413 error and make flow / node deploys from the palette successful?

All guidance is much appreciated!

// EDIT : I just spotted this in the logs, adjacent to the 413 errors:
*188 a client request body is buffered to a temporary file