You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dd-lambda-js works with container-based lambdas that are build using AWS Lambda NodeJS Runtime Interface Client . AWS lambda RIC allows to create custom docker images to use them for lambda, which is useful when you need to create a lambda based on your own docker image.
Because of this, all custom container based lambdas cannot be instrumented with version > 6.81.0.
So the problem is not really about the code itself, but the way it integrates with AWS RIC.
See error by calling running the lambda curl --request POST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' --header 'Content-Type: application/json' if you have done step 4
Expected Behavior
dd-lambda-js works with container-based lambdas that are build using AWS Lambda NodeJS Runtime Interface Client
. AWS lambda RIC allows to create custom docker images to use them for lambda, which is useful when you need to create a lambda based on your own docker image.
Actual Behavior
Since version
6.82.0
(6.81.0
is fine), the filenode_modules/datadog-lambda-js/dist/handler.js
is not bundled anymore in the npm package. However AWS lambda ric doesn't seem to work without it, it throws an errorCannot find module 'handler'
.The code that throws is that one https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/main/src/utils/UserFunction.ts#L106
Because of this, all custom container based lambdas cannot be instrumented with version > 6.81.0.
So the problem is not really about the code itself, but the way it integrates with AWS RIC.
Steps to Reproduce the Problem
curl --request POST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' --header 'Content-Type: application/json'
if you have done step 4Specifications
Stacktrace
From AWS lambda RIC:
The text was updated successfully, but these errors were encountered: