Observed since 20 Oct, 17:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
acceldata-aws-states-adapter
Acceldata AWS States Adapter
acceldata_aws_states_adapter emits OpenLineage events for AWS Step Functions executions into Acceldata ADOC.
It is designed to run as an AWS Lambda (often behind EventBridge) that:
RUNNING)Python package import root: acceldata
PyPI / distribution name: acceldata_aws_states_adapter
openlineage-python, boto3, attrspip install acceldata_aws_states_adapter
pip install acceldata-aws-states-adapter \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/
Build a layer zip with a python/ prefix (Lambda’s expected layout):
mkdir -p python
pip install acceldata_aws_states_adapter \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
-t python/
zip -r layer.zip python
Attach layer.zip as a Lambda layer and keep your handler code (for example lambda_function.py) in the function package.
cd modules/acceldata-aws-states-adapter
pip install -e .
EventBridge (aws.states / Step Functions Execution Status Change)
│
▼
AWS Lambda handler
│
├── status == RUNNING
│ └── ProcessorService.send_openlineage_event_for_state_machine_start(...)
│ • describe state machine definition
│ • build job facets (upstream / child states)
│ • optional ParentRunFacet from execution input
│ • emit OpenLineage START for the state machine run
│
└── terminal status (SUCCEEDED / FAILED / TIMED_OUT / ABORTED / ...)
└── ProcessorService.process_step_function_execution(...)
• get_execution_history
• dispatch per-state handlers (FlowFactory)
• emit START/COMPLETE/FAIL/... events per state
• emit terminal state-machine run event + run facet
| State type | Handler |
|---|---|
| Task | Task |
| Map | Map |
| Parallel | Parallel |
| Choice | Choice |
| Wait | Wait |
| Pass | Pass |
| Succeed | Success |
| Fail | Fail |
Handlers live under acceldata.step_functions.flows and are registered in FlowFactory.
| Concept | Typical value |
|---|---|
| Job namespace | From ADOC__OPENLINEAGE__NAMESPACE, or default aws-<accountId>-<region> derived from the state machine ARN |
| State machine job name | State machine name (ARN suffix) |
| State job name | <stateMachineName>.<stateName> |
| State machine run id | Step Functions execution name / id |
| Parent run | Optional, from execution input keys aws.states.openlineage.* |
Custom facets include:
AWSStateMachineJobFacet — upstream and child state topologyAWSStateMachineRunFacet — per-state terminal status mapAWSStateMachineStateInputDetailsFacet / AWSStateMachineStateOutputDetailsFacet — entered/exited state detailsEvents are posted to ADOC at:
{ADOC__OPENLINEAGE__TRANSPORT__URL}/torch-pipeline/api/v1/lineage
using HTTP headers accessKey and secretKey.
Configure the Lambda (or process) with these environment variables.
| Environment variable | Description |
|---|---|
ADOC__OPENLINEAGE__TRANSPORT__URL | ADOC base URL (host only; endpoint path is appended by the client) |
ADOC__OPENLINEAGE__TRANSPORT__ACCESS_KEY | ADOC access key |
ADOC__OPENLINEAGE__TRANSPORT__SECRET_KEY | ADOC secret key (unless Secrets Manager is enabled) |
| Environment variable | Description |
|---|---|
ADOC__OPENLINEAGE__NAMESPACE | OpenLineage job namespace override (recommended human-readable account/env name) |
ADOC__OPENLINEAGE__TRANSPORT__SECRET_MANAGER_ENABLED | Set to true to load the secret key from AWS Secrets Manager |
ADOC__OPENLINEAGE__TRANSPORT__SECRET_MANAGER_SECRET_NAME | Secrets Manager secret id/name |
ADOC__OPENLINEAGE__TRANSPORT__SECRET_MANAGER_REGION | Region for the Secrets Manager client |
If ADOC__OPENLINEAGE__NAMESPACE is unset, the adapter defaults to:
aws-<accountId>-<region>
parsed from the state machine ARN (for example aws-241571801844-ap-south-1).
If the Step Functions execution input JSON includes all of:
aws.states.openlineage.parentRunIdaws.states.openlineage.parentJobNameaws.states.openlineage.parentJobNamespacethe START event for the state machine run includes an OpenLineage ParentRunFacet.
Example execution input fragment:
{
"TransactionType": "PURCHASE",
"aws.states.openlineage.parentRunId": "1f0f2305-6017-42a6-af78-002fec15eba2",
"aws.states.openlineage.parentJobName": "Step Functions StartExecution",
"aws.states.openlineage.parentJobNamespace": "TriggerStateMachine"
}
Minimum permissions typically required by the Lambda role:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"states:DescribeStateMachine",
"states:GetExecutionHistory"
],
"Resource": "*"
}
]
}
If using Secrets Manager for the ADOC secret key, also allow:
{
"Effect": "Allow",
"Action": ["secretsmanager:GetSecretValue"],
"Resource": "arn:aws:secretsmanager:<region>:<account-id>:secret:<secret-name>*"
}
Tighten Resource ARNs to specific state machines / secrets in production.
Wire EventBridge rule(s) for Step Functions Execution Status Change to a Lambda. Example handler:
import json
from acceldata.client.client_initialiser import ClientInitialiser
from acceldata.service.processor_service import ProcessorService
def lambda_handler(event, context):
event_details = event["detail"]
status = event_details["status"]
client = ClientInitialiser.initialise_client_configuration().client
service = ProcessorService(openlineage_client=client)
if status == "RUNNING":
service.send_openlineage_event_for_state_machine_start(
state_machine_arn=event_details["stateMachineArn"],
execution_id=event_details["name"],
event_time=event_details["startDate"],
event_details=event_details,
)
else:
# SUCCEEDED / FAILED / TIMED_OUT / ABORTED / etc.
service.process_step_function_execution(
state_machine_arn=event_details["stateMachineArn"],
state_machine_execution_arn=event_details["executionArn"],
client=client,
)
return {"statusCode": 200, "body": json.dumps("ok")}
The adapter expects the standard EventBridge envelope. The handler uses event["detail"], which includes fields such as:
statusname (execution id)stateMachineArnexecutionArnstartDate (epoch millis)input (JSON string of the execution input, when included)acceldata/
client/ # ADOC OpenLineage HTTP client + env/Secrets Manager bootstrap
constants/ # Env var names and Step Functions field constants
facets/ # Custom OpenLineage facets for AWS Step Functions
service/ # ProcessorService + Step Functions describe/history services
step_functions/ # FlowFactory, utils, per-state flow handlers
Primary entry points for integrators:
acceldata.client.client_initialiser.ClientInitialiseracceldata.service.processor_service.ProcessorServicecd modules/acceldata-aws-states-adapter
pip install -U build twine
rm -rf dist/ build/ *.egg-info
python -m build
twine check dist/*
# TestPyPI
twine upload --repository testpypi dist/*
# PyPI (after validation)
twine upload dist/*
Version is read from the VERSION file (dynamic setuptools version).
MIT — see LICENSE.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
openlineage-pythonEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.12",
"evaluation": "NOT_EVALUATED"
} | openlineage-python | runtime |
boto3Environment{
"extras": "",
"marker": null,
"requires_python": ">=3.12",
"evaluation": "NOT_EVALUATED"
} | boto3 | runtime |
attrsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.12",
"evaluation": "NOT_EVALUATED"
} | attrs | runtime |
buildEnvironment{
"extras": "",
"marker": "extra == \"release\"",
"requires_python": ">=3.12",
"evaluation": "NOT_EVALUATED"
} | build>=1; extra == "release" | runtime |
twineEnvironment{
"extras": "",
"marker": "extra == \"release\"",
"requires_python": ">=3.12",
"evaluation": "NOT_EVALUATED"
} | twine>=5; extra == "release" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"test\"",
"requires_python": ">=3.12",
"evaluation": "NOT_EVALUATED"
} | pytest>=8; extra == "test" | runtime |
bdist_wheel · 33.9 KB · Python py3
sdist · 31.9 KB · Python source
Observed since 20 Oct, 17:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:2c5eb988bd75bd977c0d413ba6d83cca1d006ed0db14039fb772b4cf231eaa68