Skip to main content

AWS Durable Execution SDK for Python — Durable Execution Telemetry Exporter

Durable Execution Telemetry instrumentation plugin for the AWS Durable Execution SDK for Python. A port of the JavaScript SDK's durableExecutionTelemetry() plugin: it listens to the SDK's instrumentation hooks and emits one curated DurableExecutionTelemetry record per execution to the configured exporters. The wire record keeps the JS camelCase field names so records read identically across SDKs.

Experimental. Like its JS counterpart, this plugin is experimental and may change or be removed in future releases.

Install

pip install aws-durable-execution-sdk-python-telemetry-exporter
# with the S3 exporter's local-dev dependency:
pip install "aws-durable-execution-sdk-python-telemetry-exporter[s3]"

Usage

from aws_durable_execution_sdk_python import durable_execution
from aws_durable_execution_sdk_python_telemetry_exporter import (
    DurableExecutionTelemetryConfig,
    durable_execution_telemetry,
)
from aws_durable_execution_sdk_python_telemetry_exporter.exporters import S3Exporter

@durable_execution(
    plugins=[
        durable_execution_telemetry(
            DurableExecutionTelemetryConfig(
                exporters=[
                    S3Exporter(bucket="my-bucket", prefix="durable-execution-telemetry/")
                ],
            )
        )
    ]
)
def handler(event, context):
    ...

With no exporter configured, records are written to the function's own CloudWatch log group as single JSON lines (the LambdaLogExporter default), carrying the name-keyed operationsByName summary. The S3Exporter writes the lossless per-occurrence operations array, one object per execution (upsert-by-execution-name, so re-emission overwrites rather than appends).

Exporters

All exporters live in aws_durable_execution_sdk_python_telemetry_exporter.exporters and are re-exported from the package root. Each serializes the record as compact JSON. Exporters that call AWS accept an injected client= for tests and use the Lambda runtime's boto3 otherwise; none adds a required dependency.

Exporter Destination Upsert Operations shape Default size limit
LambdaLogExporter Function's own log group No operationsByName 256 KB
CloudWatchLogsExporter Any log group, one stream per day No operationsByName 256 KB
S3Exporter S3 object per execution Yes (key) operations 5 MB
DynamoDBExporter DynamoDB item Configurable operationsByName 400 KB
AuroraExporter Aurora MySQL/PostgreSQL row (Data API) Yes (upsert) full record as JSON column 1 MB
RedshiftExporter Redshift row (Data API) Yes (MERGE) full record as SUPER column 1 MB
OpenSearchExporter OpenSearch document Yes (_id) operations 10 MB
FirehoseExporter Firehose delivery stream N/A operations_format 1 MB
EventBridgeExporter EventBridge event N/A operations_format 256 KB
SQSExporter SQS message N/A operations_format 256 KB
OTelExporter OTLP/HTTP logs endpoint N/A operations_format 1 MB
HttpExporter Any HTTP endpoint N/A operations_format none
FileExporter Directory (EFS, mount, /tmp) Configurable operations_format none

operations_format is "array" (default), "by-name", or "both" (OperationsFormat). max_record_size_bytes raises or lowers an exporter's size limit; omitting it keeps the default. HttpExporter and FileExporter have no default and do not truncate unless a limit is set.

CloudWatchLogsExporter

Writes one PutLogEvents event per record to log_group_name, in a stream named {log_stream_prefix}{YYYY}/{MM}/{DD} (default prefix durable-execution-telemetry/). IAM: logs:CreateLogStream, logs:PutLogEvents on the log group.

CloudWatchLogsExporter(log_group_name="/custom/durable-execution-telemetry")

DynamoDBExporter

PutItem keyed by partition_key (default pk) = executionArn. With the default sort_key="sk" (= emittedAt) every export adds an item; pass sort_key=None for a key-only table that upserts. IAM: dynamodb:PutItem.

DynamoDBExporter(table_name="durable-execution-telemetry")

AuroraExporter

Upserts a row by execution_arn through the RDS Data API; engine is "postgresql" or "mysql" and selects the dialect. Columns: execution_arn, execution_name, function_name, status, start_time, end_time, duration_ms, record_json, emitted_at. IAM: rds-data:ExecuteStatement, secretsmanager:GetSecretValue.

AuroraExporter(
    resource_arn="arn:aws:rds:us-east-1:123456789012:cluster:my-cluster",
    secret_arn="arn:aws:secretsmanager:us-east-1:123456789012:secret:my-db-creds",
    database="telemetry",
    engine="postgresql",
)

RedshiftExporter

MERGE by execution_arn through the Redshift Data API into {schema}.{table} (default public.durable_execution_telemetry, same columns as Aurora, record_json as SUPER). Provide workgroup_name (Serverless) or cluster_identifier (provisioned, with db_user or secret_arn). IAM: redshift-data:ExecuteStatement plus redshift-serverless:GetCredentials or secretsmanager:GetSecretValue. The statement is submitted and not awaited, so statement failures are not reported and on-change records may land out of order; prefer the default on-complete emit mode with this exporter.

RedshiftExporter(database="telemetry", workgroup_name="telemetry-wg")

OpenSearchExporter

PUT {endpoint}/{index_name}/_doc/{executionArn} (default index durable-execution-telemetry). auth="sigv4" (default) signs with the runtime's credentials via botocore; auth="basic" uses username/password. IAM: es:ESHttpPut on the domain.

OpenSearchExporter(endpoint="https://my-domain.us-east-1.es.amazonaws.com", region="us-east-1")

FirehoseExporter

PutRecord of one JSON line (trailing newline) per record. IAM: firehose:PutRecord.

FirehoseExporter(delivery_stream_name="durable-execution-telemetry-stream")

EventBridgeExporter

PutEvents with Source (default software.amazon.lambda.durable.telemetry), DetailType = record status, Detail = record. All arguments optional. IAM: events:PutEvents.

EventBridgeExporter(event_bus_name="default")

SQSExporter

SendMessage with the record as body and status/functionName message attributes. A .fifo queue URL enables MessageGroupId (default executionArn, or message_group_id) and a deduplication id of executionArn:emittedAt. IAM: sqs:SendMessage.

SQSExporter(queue_url="https://sqs.us-east-1.amazonaws.com/123456789012/telemetry")

OTelExporter

POSTs one OTLP ExportLogsServiceRequest (http/json only) per record to endpoint; identity fields become attributes and the record is the log body. Pass vendor auth in headers. No IAM.

OTelExporter(endpoint="https://otlp.vendor.com/v1/logs", headers={"x-api-key": "..."})

HttpExporter

POST (or method="PUT") the record as JSON to url with Content-Type: application/json plus headers; a non-2xx status raises. timeout_ms defaults to 10000 and currently applies to each socket operation (the connect, each write of the request, and each read of the status line, headers, and a non-2xx error body; a 2xx body is never read) rather than to the whole request, so an endpoint that consumes or responds slowly can hold the export open longer than timeout_ms; a future release may enforce it as a whole-request deadline. No IAM.

HttpExporter(url="https://hooks.example.com/telemetry", headers={"Authorization": "Bearer ..."})

FileExporter

mode="ndjson" (default) appends to {directory}/{YYYY-MM-DD}.ndjson; mode="json" writes {directory}/{executionName}.json, overwriting on update. For Lambda use an EFS mount (IAM: elasticfilesystem:ClientMount, elasticfilesystem:ClientWrite) or /tmp for testing. Appends from many concurrent environments to one NDJSON file on a network file system can interleave; use mode="json" when several environments share a directory.

FileExporter(directory="/mnt/efs/durable-execution-telemetry")

Emission behavior, record schema (recordType: DurableExecutionTelemetry, schemaVersion: "1.0"), sampling, content configuration (input/output omission, include_errors, per-operation result opt-in), truncation phases, and top-level vs full-tree operation detail all mirror the JS plugin. Behavior is validated cross-SDK by the telemetry conformance suite (aws-durable-execution-conformance-tests-telemetry).

Note (asynchronous export). Export rendering, truncation, export(), and flush() run on one lazy background worker per plugin. Checkpoint hooks only replace that execution's latest pending snapshot and wake the worker. Consecutive on-change snapshots for one execution coalesce whenever the worker has not yet claimed the previous one, including when no export is running, so under fast in-memory checkpoints (the local runner) a burst may deliver only its first and latest snapshots. Snapshots from different executions never coalesce with each other. An invocation that emits a record drains every pending snapshot and flushes exporters before it returns; invocations that emit nothing do not start or flush the worker.

Requirements

  • aws-durable-execution-sdk-python with the plugin invocation hooks that surface execution_input / execution_result (included since the version this package declares as its minimum).

Metadata

Release files for aws-durable-execution-sdk-python-telemetry-exporter 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-durable-execution-sdk-python-telemetry-exporter 0.0.1
File Size Uploaded Provenance
aws_durable_execution_sdk_python_telemetry_exporter-0.0.1.tar.gz 55.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-durable-execution-sdk-python-telemetry-exporter 0.0.1
File Interpreter ABI Platform
aws_durable_execution_sdk_python_telemetry_exporter-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 103.5 kB

Release files / aws_durable_execution_sdk_python_telemetry_exporter-0.0.1.tar.gz

Download URL aws_durable_execution_sdk_python_telemetry_exporter-0.0.1.tar.gz
Size 55.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a62fd090221fada4369c1c2faf58d7a65bfac4ea959d78447f63fb17340680a1
BLAKE2b-256 checksum
How to use checksums
60000637cd5327015e6983f98f25217d55401b7c0f81233b478d8e0cf1984cc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / aws_durable_execution_sdk_python_telemetry_exporter-0.0.1-py3-none-any.whl

Download URL aws_durable_execution_sdk_python_telemetry_exporter-0.0.1-py3-none-any.whl
Size 48.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6159a3a083474aed1ca98aba5e61b0b58d287d766788189af961cb94d8953569
BLAKE2b-256 checksum
How to use checksums
6971b1217a1fbbc86533a6198e53bfe5d02a0f574e88bd79ca9be9f46118716a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for aws-durable-execution-sdk-python-telemetry-exporter 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aws_durable_execution_sdk_python_telemetry_exporter-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page