New relic integration not working for AWS Lambda with Serverless Framework

Hey,

I have an Express JS APP deployed over AWS Lambda using Serverless Framework. I followed the steps for the integration but somehow it is not working for me. I am using serverless-newrelic-lambda-layer 0.2.5.

I am getting the following error:
{ “errorType”: “Error”, “errorMessage”: “Cannot find module ‘./newrelic-lambda-wrapper.js’\nRequire stack:\n- /var/task/s_app.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js”, “code”: “MODULE_NOT_FOUND”, “requireStack”: [ “/var/task/s_app.js”, “/var/runtime/UserFunction.js”, “/var/runtime/index.js” ], “stack”: [ “Error: Cannot find module ‘./newrelic-lambda-wrapper.js’”, “Require stack:”, “- /var/task/s_app.js”, “- /var/runtime/UserFunction.js”, “- /var/runtime/index.js”, " at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)", " at Module._require.o.require (/var/task/serverless_sdk/index.js:9:72934)", " at require (internal/modules/cjs/helpers.js:72:18)", " at Object. (/var/task/s_app.js:25:23)", " at Module._compile (internal/modules/cjs/loader.js:1137:30)", " at Object.Module._extensions…js (internal/modules/cjs/loader.js:1157:10)", " at Module.load (internal/modules/cjs/loader.js:985:32)", " at Function.Module._load (internal/modules/cjs/loader.js:878:14)", " at Module.require (internal/modules/cjs/loader.js:1025:19)", " at require (internal/modules/cjs/helpers.js:72:18)" ] }

Any clue what the issue can be?

@toolsadmin Sorry you have been waiting awhile for a response from our community. I’m going to bring this back to the attention of our support team. Thanks for your patience!

Neal Mc

1 Like

Hi,

Do you have Serverless Monitoring enabled? This would be a “org: …” and “app: …” line in your serverless.yml file. If so, you will need to remove it as it overrides the New Relic plugin.

1 Like