Abstract


  • The above diagram shows the architecture of Datadog Lambda Monitoring

Setup Guide


Prerequisites

We are using Python for the example. But the same setup process applies to other languages. You can refer to the Official Guilde for more information. There are mainly 3 things we need to do, and we can automate the process with this Terraform Template

Add Datadog Lambda Extension

Add Datadog Lambda Library

Fine tune with Environment Variables

  • Below is a table of commonly used environment variables:
Variable NameDescriptionOptional
DD_API_KEYGives the permissions to pipe monitoring data to DatadogNo
DD_SITEThe Datadog endpoint we want to pipe the monitoring data toNo
DD_TRACE_ENABLEDIf we want to enable Trace or notYes
DD_ENVLogical grouping name of monitoring data on the Datadog dashboardYes
DD_SERVICELogical grouping name of monitoring data on the Datadog dashboardYes
DD_SERVERLESS_APPSEC_ENABLEDIf we want to enable Security Signals on the Lambda functionYes
DD_LAMBDA_HANDLERRequired for Python and NodeJS Lambda, refer to official guide for more informationYes/No

References