Getting NodeJS deprecation error when execute an AWS Lambda (using node 12.x):
[DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
can not find which module/piece of code is producing it. Nothing seems to reference _headers or _headerNames.
In Node should be possible to set a parameter or environment variable as explain here to --trace-deprecation and/or --trace-warnings and/or --throw-deprecation. When setting one or multiple of these values in AWS Console Environment variables for the lambda, no extra information is displayed.
What is the way to set this runtime parameter for an AWS Lambda? Is there a way to catch the stack trace to know where is the deprecated error happening?

_headers( nodejs.org/api/… ), can you post the code ?NODE_OPTIONSenv variable like thisNODE_OPTIONS='--trace-deprecation''(nodejs.org/api/cli.html#cli_node_options_options)process.on('warning', warning => console.log( warning.stack ) );to console.log the stack.