Looking to filter telemetry from your Lambda functions? See the Lambda
Extension instead.
How it works
The Tero Edge Lambda Extension integrates with the Datadog Forwarder to provide policy-based log filtering. The extension runs as an external Lambda extension alongside the forwarder, intercepting logs and applying your policies before forwarding to Datadog. Use cases:- Filter CloudWatch logs from EC2, RDS, ECS, and other AWS services
- Apply policies to S3 access logs, ALB logs, or CloudTrail events
- Drop noisy AWS service logs before they’re indexed in Datadog
Prerequisites
- AWS account with logs you want to forward to Datadog
- Datadog account with an API key
- Tero account with an API key
The Tero Edge Extension layer is currently available in
us-east-1 only. Need
support in another region? Contact us.Setup
- CloudFormation
- Manual
Deploy the Datadog Forwarder with Tero Edge Extension using CloudFormation.
Launch Stack
Deploy via AWS CloudFormation
Required parameters
| Parameter | Description |
|---|---|
DdApiKey | Your Datadog API key |
DdSite | Your Datadog site (e.g., us5.datadoghq.com, datadoghq.com, datadoghq.eu) |
TeroPolicyApiKey | Your Tero API key for policy sync |
Tero Edge parameters
The extension is enabled by default. Configure these parameters as needed:| Parameter | Default | Description |
|---|---|---|
TeroEdgeLayerVersion | 4 | Version of the Tero Edge layer. Set to empty string to disable. |
TeroEdgeLayerArn | (auto) | Override the full layer ARN. Leave empty to use default. |
TeroPolicyUrl | https://sync.usetero.com/v1/policy/sync | HTTP policy provider URL |
TeroPolicyApiKey | API key for authenticating with the policy provider | |
TeroPolicyStatic | JSON string for static policies (alternative to HTTP provider) | |
TeroListenPort | 3000 | Port for the extension proxy server |
TeroLogLevel | info | Log level (debug, info, warn, err) |
The extension automatically configures the Datadog Forwarder to route logs
through
localhost:3000. The upstream URL is derived from your DdSite
parameter.Triggers
After deploying the forwarder, configure triggers to send AWS logs to it.- Automatic
- Manual
Use the Datadog AWS integration to automatically set up log collection.
Get the forwarder ARN
In the AWS console, go to Lambda → Functions and select your Datadog Forwarder. Copy the Function ARN from the function overview.
Configure the AWS integration
In Datadog, go to Integrations → Amazon Web Services. Select your AWS account and navigate to the Log Collection tab.Paste the forwarder ARN and save.
Static policies
For simple use cases, you can embed policies directly in the Lambda configuration instead of using the HTTP policy provider. SetTeroPolicyStatic (or TERO_POLICY_STATIC environment variable) to a JSON
string:
Environment variables reference
| Variable | Description |
|---|---|
TERO_UPSTREAM_URL | Datadog intake URL for forwarding logs |
TERO_LISTEN_PORT | Port for the extension proxy (default: 3000) |
TERO_LOG_LEVEL | Log verbosity: debug, info, warn, err |
TERO_POLICY_URL | HTTP policy provider URL |
TERO_POLICY_API_KEY | API key for the policy provider |
TERO_POLICY_STATIC | JSON string with static policies |
TERO_SERVICE_VERSION | Version identifier for tracking |
Troubleshooting
Extension not starting Check CloudWatch logs for the extension:LaunchError, verify the layer ARN matches your architecture (ARM64
vs x86_64).
Policies not applying
- Verify
TERO_POLICY_URLis set and accessible - Check
TERO_POLICY_API_KEYis correct - Enable
TERO_LOG_LEVEL=debugto see policy loading logs
- Verify
TERO_UPSTREAM_URLmatches your Datadog site - Check the Lambda has network access to Datadog endpoints
- Review extension logs for TLS or connection errors
DD_URL=localhostDD_PORT=3000DD_NO_SSL=true
Disabling Tero Edge
To disable the extension and route logs directly to Datadog: CloudFormation: SetTeroEdgeLayerVersion to an empty string.
Manual: Remove the Tero Edge layer and unset the DD_URL, DD_PORT,
DD_NO_SSL, and TERO_* environment variables.