[SVLS-8979] Add CloudFormation template for Lambda Durable Function event forwarder#330
Conversation
…vent forwarder Captures AWS Lambda Durable Function execution status change events from EventBridge and forwards them to the Datadog HTTP intake via Amazon Data Firehose. Records arrive at Datadog as the raw EventBridge envelope; reshaping is handled by the Datadog-side logs pipeline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
📊 dbt CICD (full report) Impact Lineage Error detailsError fetching impact lineage results. Drift Detection Error detailsError fetching drift detection results. 🔗 Commit SHA: 812c224 | Docs | Give us feedback! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Keep the README user-facing: drop CloudFormation-internal notes
(NoEcho, {{resolve:...}} dynamic references, Rules.ApiKeyRequired,
Mappings.Constants) and the Firehose-URL aside from the parameter
and output tables.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new, customer-installable CloudFormation template (plus documentation) to capture AWS Lambda Durable Function execution status change events from EventBridge and forward them to Datadog via Kinesis Data Firehose, with failed-record backup to S3.
Changes:
- Introduces
aws_durable_function_event_forwarder/durable_function_event_forwarder.yamlto provision EventBridge rule, Firehose delivery stream, IAM roles, and S3 backup bucket. - Adds
aws_durable_function_event_forwarder/README.mdexplaining architecture, parameters, outputs, and the raw forwarded event shape.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| aws_durable_function_event_forwarder/durable_function_event_forwarder.yaml | New CloudFormation template provisioning EventBridge → Firehose → Datadog forwarding with S3 failed-record backup. |
| aws_durable_function_event_forwarder/README.md | Documentation for deploying/configuring the template and understanding the forwarded payload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Description: drop "transforms into Datadog log documents" — the stack forwards raw EventBridge envelopes unchanged. - Add Rules.ApiKeyExclusive so exactly one API key source is enforced (previously multiple could be set, with plaintext silently winning). - Expire S3 backup records after 30 days instead of retaining forever. - README: minor grammar fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make serverless-aws and serverless-onboarding-enablement owners of aws_durable_function_event_forwarder/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Leave serverless-aws as the sole owner of aws_durable_function_event_forwarder/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Context
To capture TIMED_OUT and STOPPED status of Lambda durable function executions, we need to capture the status change events in EventBridge and forward them to Datadog. This involves three changes:
This template was originally proposed in DataDog/datadog-serverless-functions#1149. Per team guidance, this repo (
cloudformation-template) is the correct place to host the template, so the PR has been re-created here following this repo's conventions (a top-levelaws_<name>/directory with the template andREADME.md). Publishing the template to S3 will be handled separately in a different repo, so this PR contains no release script.Architecture
This is Option 4.3 in the design doc. See the doc for why we need to capture the status change events.
Changes
aws_durable_function_event_forwarder/durable_function_event_forwarder.yaml— the CloudFormation template for the AWS-side resourcesaws_durable_function_event_forwarder/README.mdParams of the CloudFormation template
datadoghq.comRUNNING,SUCCEEDED,FAILED,TIMED_OUT,STOPPED.arn:aws:lambda:us-east-2:425362996713:function:my-durable-function, or a wildcard pattern, e.g.arn:aws:lambda:us-east-2:425362996713:function:my-durable-*.Next steps
Test plan
Steps
aws_durable_function_event_forwarder/directory:arn:aws:lambda:us-east-2:425362996713:function:yiming-durable-py-custom-traceryiming-durable-py-custom-tracerResult
After a few minutes, the logs appeared in Datadog.
Raw logs, without the new logs pipeline on Datadog side for transforming the durable execution event logs: (query)

Processed logs (with the logs pipeline added in https://github.com/DataDog/integrations-internal-core/pull/3389): (query)
