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.The extension does not support FIPS compliance. Reach out to Tero
Support if this is required for your environment.
Versioning
Releases track Datadog’s upstream releases. Upstream publishesv<N> tags, so a
Tero release named for upstream v119 contains upstream v119. A new Tero release
follows each upstream release.
An AWS layer version is a single integer, and AWS only ever appends to it — you
cannot ask for version 119. So the upstream version goes in the layer name,
and the layer version integer is the patch number:
This keeps the upstream number exact in every region without publishing filler
versions to advance a counter, and it gives patches somewhere to live. A region
we add later starts at patch 1, so patch numbers can differ per region. The
upstream number never does.
The older
Tero-Datadog-Extension and Tero-Datadog-Extension-ARM layers, at
versions 1 through 4, still exist and still work. Move to a versioned name when
you next update the layer.
Prerequisites
- Lambda function with Datadog monitoring configured (see Datadog’s Lambda setup guide)
- Tero account
Connect
1
Add the Lambda layer
Replace the standard Datadog extension layer with the Tero version.ARM64:AMD64:Three parts change. The account ID
242046726909 does not.<region>must match your function’s region. We publish tous-east-1,us-east-2,us-west-1,us-west-2,eu-west-1,eu-west-2,eu-west-3,eu-central-1, andeu-north-1.<dd-version>is the Datadog extension version the layer is built from. Pick the name matching the version you want:Tero-Datadog-Extension-119contains Datadog v119.<patch>is Tero’s patch number for that Datadog version. Use the highest one published for it in your region.
The releases list both numbers. A
v119.2 release is Datadog v119, patch 2. See Versioning for why the version lives in the name.2
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.3
Verify
Invoke your Lambda function and check CloudWatch logs for extension startup:In Datadog, confirm the expected logs, metrics, or traces arrive and that
any test telemetry matching your policy is absent or sampled at the expected
rate.
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
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
- The extension evaluates each telemetry item (logs, traces, metrics) against policies
- Based on policy rules, the extension keeps, drops, samples, or rate-limits each item
Troubleshooting
Extension not loading Verify the layer ARN matches your Lambda architecture (ARM64 vs x86_64) and your function’s region. Check CloudWatch logs for extension startup errors. Layer ARN does not resolve The layer name carries the Datadog version, soTero-Datadog-Extension-118 and
Tero-Datadog-Extension-119 are different layers. Confirm the version in the
name is one we publish, and that the patch number exists in that region. Patch
numbers can differ per region: a region we added later starts at patch 1, so a
patch that resolves in us-east-1 may not resolve in eu-north-1 yet.
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