luke
01/31/2022, 1:51 PMnewrelic-lambda-wrapper.handler
. But I cannot set this in my stack code (like in this SAM example), as SST will try to do this and fail:
Building Lambda function newrelic-lambda-wrapper.handler
Error: Cannot find a handler file for "newrelic-lambda-wrapper.handler".
thdxr
01/31/2022, 2:20 PMthdxr
01/31/2022, 5:27 PMFrank
NEW_RELIC_LAMBDA_HANDLER
en varFrank
this.getAllFunctions().forEach(fn => {
const cfnFunction = fn.node.defaultChild;
fn.addEnvironment("NEW_RELIC_LAMBDA_HANDLER", cfnFunction.handler);
cfnFunction.handler = "app.lambdaHandler";
});
Frank
thdxr
01/31/2022, 8:24 PMluke
02/03/2022, 1:04 PM