Looking to filter AWS service logs (CloudWatch, S3, etc.)? See the Lambda
Forwarder instead.
How it works
The Tero Datadog Lambda Extension is a fork of the Datadog Lambda Extension with policy-based telemetry filtering. It runs as a Lambda layer alongside your function, evaluating each telemetry item against your policies before forwarding to Datadog. We maintain this fork to release within two weeks of upstream Datadog releases.FIPS compliance is not currently supported. Reach out to Tero
Support if this is required for your environment.
Prerequisites
- Lambda function with Datadog monitoring configured (see Datadog’s Lambda setup guide)
- Tero account
Connect
Create an Edge API key
Open your terminal and run:Navigate to Edge → API Keys → Create. Name your key (e.g., “Lambda production”). Copy the key when shown—it’s only displayed once.
Add the Lambda layer
Replace the standard Datadog extension layer with the Tero version.ARM64:AMD64:
Replace
<version> with the latest version number. Check the releases for current versions.Configure environment variables
Add these environment variables to your Lambda function:
This assumes
DD_API_KEY and DD_EXTENSION_ENABLED=true are already configured from your existing Datadog setup.Policy providers
The extension fetches policies from configured providers. SetDD_POLICY_PROVIDERS to a JSON array of provider configurations.
HTTP provider
Recommended for production. Fetches policies from a remote endpoint and polls for updates.File provider
For local testing. Reads policies from a file bundled with your Lambda deployment.Provider options
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for this provider |
type | string | Yes | http or file |
url | string | http only | URL to fetch policies from |
path | string | file only | Path to local policy JSON file |
headers | array | No | HTTP headers for authentication |
poll_interval_secs | number | No | Polling interval in seconds (default: 60) |
Deployment examples
- Terraform
- AWS SAM
- Serverless Framework
- AWS CLI
How policy filtering works
WhenDD_POLICY_ENABLED=true:
- The extension fetches policies from configured providers on startup
- HTTP providers poll for updates at the configured interval
- Each telemetry item (logs, traces, metrics) is evaluated against policies
- Based on policy rules, items are either kept, dropped, sampled, or rate limited
Troubleshooting
Extension not loading Verify the layer ARN matches your Lambda architecture (ARM64 vs x86_64). Check CloudWatch logs for extension startup errors. Policies not applying- Ensure
DD_POLICY_ENABLED=trueis set - Verify
DD_POLICY_PROVIDERSis valid JSON - Check that your policy provider URL is accessible from the Lambda VPC
- Verify the Authorization header value is correct
- Ensure your Tero API key is valid and not revoked