This folder contains examples using Lambda Web Adapter and Datadog instrumentation, in nodejs (expressjs) and python (flask).
The examples use aws cdk to deploy and curl to test, so make sure they are installed.
Instructions are for expressjs, similarly use the flask folder for the python example
Install aws cdk dependencies
cd expressjs/cdk
npm i
cd -Install Datadog dependencies
cd expressjs/lambda-asset/src
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