This folder contains examples using Lambda Web Adapter and Datadog instrumentation in nodejs (expressjs) using a zipfile and layers instead of a container.
The examples use aws cdk to deploy and curl to test, so make sure they are installed.
Instructions are for expressjs
Install aws cdk dependencies
cd expressjs/cdk
npm i
cd -Deploy with
cd expressjs/cdk
cdk deploy
cd -After confirming the deployment, a log will show a public Lambda URL to invoke the endpoint with
Outputs:
lwa-stack.LambdaFunctionUrl = https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.lambda-url.us-east-1.on.aws/and the function can be invoked with (note the call_lwa at the end of the URL)
curl https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.lambda-url.us-east-1.on.aws/call_lwaNB this deployment will create a publicly accessible URL link with no security restriction and usage limits! Make sure to run
cd expressjs/cdk
cdk destroy
cd -after the example test is done