An AWS Lambda Extension to collect, enhance and transport telemetry to New Relic for AWS Lambda functions without requiring an external transport such as CloudWatch Logs or Kinesis.
Apache License 2.0
74
stars
50
forks
source link
Unable to use New Relic layer in lambda that is already using the aws-lambda-web-adapter layer #217
Description
The lambda runtime is unable to locate the _newrelic_lambdawrapper.handler in a lambda that uses the aws-lambda-web-adapter layer (https://github.com/awslabs/aws-lambda-web-adapter) which apparently is another wrapper.
So the issue is trying to set a wrapper inside another wrapper.
Steps to Reproduce
Define a lambda resource using the Serverless Application Model (SAM) like the one below:
or use the sample code provided by AWS itself and then apply the following environment variables:
Expected Behaviour
The value inside the environment variable NEW_RELIC_LAMBDA_HANDLER should be able to be located by the New Relic wrapper
Relevant Logs / Console output
Lambda log error:
/opt/bootstrap: line 3: /var/task/newrelic_lambda_wrapper.handler: No such file or directory
Your Environment
Additional context
Is there any suggested workaround for this lambda scenario? I could not find anything in the docs and neither in any past issues from github