AWS Lambda Extensions are companion processes that augment your Lambda functions. They run within the Lambda execution environment, alongside your Lambda function code. The Datadog Extension is a lightweight version of the Datadog agent built to run alongside your code with minimal performance overhead.
The Datadog Extension currently supports submitting custom metrics synchronously while your AWS Lambda function executes. This means that you can submit your custom metrics without the Datadog Forwarder. Note that the Datadog Forwarder is still required to submit logs and traces to Datadog.
The Datadog Extension is distributed as its own Lambda Layer (separate from the Datadog Lambda Library) and supports Node.js, Python, and Go runtimes.
Add the Lambda Layer for the Datadog Extension to your AWS Lambda function:
Replace the placeholder
AWS_REGION in the Lambda Layer ARN with appropriate values.
If you are using Node.js or Python, add the Lambda Layer for the Datadog Library to your AWS Lambda function:
Reference the sample code to submit a custom metric.
Additional helpful documentation, links, and articles: