> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Step Functions workflows

> Resources, examples, configuration and evidence for AWS Step Functions workflows.

Use the `@bijection/connectors/stepfunctions` entrypoint to declare AWS Step Functions workflows resources.

## Availability

This page describes the pinned source package. Published availability is unestablished for this artifact. [Source build and package availability](https://docs.bijection.com/client/sdk-distribution.md).

## Resources and modes

| Resource | Mode | Description |
| - | - | - |
| Workflow | `observed` | observed |

Declare a resource in application code, then bind deployment-specific settings and credentials. See [typed resources](https://docs.bijection.com/integrations/resources.md), [connections](https://docs.bijection.com/integrations/connections.md) and [source inspection](https://docs.bijection.com/integrations/cli.md).

## Workflow

### observed: observed

The following example matches configuration `standard`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { stepfunctions } from "@bijection/connectors/stepfunctions";
import { makeFunctionReference } from "bijection/server";

export const fulfillment = stepfunctions.workflow.observed({
  contract: {
    digest: "819670c6ecde07c70091b850b092663601eeeca0cbf26eae945db45f2feb52ae",
    contract: {
      protocol: "bijection.stepfunctions.v1",
      name: "fulfillment",
      type: "STANDARD",
      input: {
        type: "object",
        properties: {
          tenant_id: { type: "string" },
          order_id: { type: "string" },
          process_id: { type: "string" },
          terms_hash: { type: "string" },
        },
        required: ["tenant_id", "order_id", "process_id", "terms_hash"],
        additionalProperties: false,
      },
      output: {
        type: "object",
        properties: {
          phase: { type: "string" },
          shipment_id: { type: "string" },
        },
        required: ["phase", "shipment_id"],
        additionalProperties: false,
      },
      progress: {
        type: "object",
        properties: {
          tenant_id: { type: "string" },
          order_id: { type: "string" },
          process_id: { type: "string" },
          terms_hash: { type: "string" },
          phase: { type: "string" },
          decision_call_id: { type: "string" },
          shipment_id: { type: "string" },
          execution_id: { type: "string" },
          revision: { type: "integer" },
        },
        required: [
          "tenant_id",
          "order_id",
          "process_id",
          "terms_hash",
          "phase",
          "decision_call_id",
          "shipment_id",
          "execution_id",
          "revision",
        ],
        additionalProperties: false,
      },
      identity: ["tenant_id", "order_id", "process_id"],
      callbacks: {
        decide: {
          state: "Approval",
          decision: {
            type: "object",
            properties: {
              expected_revision: { type: "integer" },
              terms_hash: { type: "string" },
              decision: { type: "string", enum: ["approve", "reject"] },
              actor_id: { type: "string" },
            },
            required: [
              "expected_revision",
              "terms_hash",
              "decision",
              "actor_id",
            ],
            additionalProperties: false,
          },
        },
      },
      allow_cancel: true,
      recovery: "observe_original_only",
      minimum_evidence_retention_seconds: 604800,
      payload_bytes: 32768,
    },
  },
  release: {
    digest: "1de06ff2b35a8b1d7ba1fa57d14dd9b0e57092428e35ac3eb12098bee14388f5",
    release: {
      environment_id: "orders_staging_01",
      account_id: "123456789012",
      region: "eu-west-1",
      version_arn:
        "arn:aws:states:eu-west-1:123456789012:stateMachine:fulfillment-demo:1",
      definition_digest:
        "7879accc7182f3cf199095ca43cf7a8f096ea95a58545eb44ba8d55034856638",
      contract_digest:
        "819670c6ecde07c70091b850b092663601eeeca0cbf26eae945db45f2feb52ae",
      epoch: "3b45bd94f82bf2f7e6f235c861badd06808f2f39020738ff102946bb8fca4e43",
      generator: "bijection.stepfunctions.codegen.v1",
      evidence_retention_seconds: 604800,
      administrative_policy: "no_redrive_or_id_reuse",
      retained: [],
    },
  },
  access: {
    read: makeFunctionReference<"query", any, [null]>("permissions:workflow"),
    reads: [],
  },
  governingRules: {
    start: makeFunctionReference<"query", any, [null]>("permissions:workflow"),
    decide: makeFunctionReference<"query", any, [null]>("permissions:workflow"),
    requestCancellation: makeFunctionReference<"query", any, [null]>(
      "permissions:workflow",
    ),
  },
});
```

> **Inferred record types**
>
> ```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "key": string;
>   "service_key": string;
>   "gate_id": string | null;
>   "gate_name": string | null;
>   "gate_expires_at": number | null;
>   "redrive_count": number;
>   "execution_started_at": number;
>   "execution_id": string;
>   "input": { readonly tenant_id: string; readonly order_id: string; readonly process_id: string; readonly terms_hash: string; } & {};
>   "start_request_id": string;
>   "snapshot": ({ readonly tenant_id: string; readonly order_id: string; readonly process_id: string; readonly terms_hash: string; readonly phase: string; readonly decision_call_id: string; readonly shipment_id: string; readonly execution_id: string; readonly revision: number; } & {}) | null;
>   "result": { kind: "unavailable"; } | { kind: "available"; value: { readonly phase: string; readonly shipment_id: string; } & {}; };
>   "runtime_status": string;
>   "runtime_observed_at": number;
>   "snapshot_revision": number;
>   "observation_id": string;
>   "contract_digest": string;
>   "observed_at": number;
> }
> ```

The function references identify application policy queries. Implement those policies in your application; the references alone grant no authority.

#### Configuration: standard

Case: `stepfunctions/workflow/observed/standard`.

Connection and resource configuration are declared by this exact case.

Credential kind: `http`. Keep credential material in the private credential inventory.

| Setting | Type | Required | Owner |
| - | - | - | - |
| `endpoint` | string | Yes | Shared connection |
| `environment_id` | string | Yes | Shared connection |

> **Complete configuration contract**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "setup": [],
>   "resource": {
>     "access": {
>       "records": {
>         "read": {
>           "query": "permissions:workflow"
>         },
>         "reads": []
>       }
>     },
>     "defaults": {},
>     "connector": "http",
>     "output": {
>       "kind": "single",
>       "collection": "records"
>     },
>     "credential_kind": "http",
>     "connection_fields": [
>       "endpoint",
>       "environment_id"
>     ],
>     "address": {
>       "kind": "setup",
>       "field": "endpoint"
>     }
>   },
>   "connection_setup": {
>     "type": "object",
>     "value": {
>       "endpoint": {
>         "fieldType": {
>           "type": "string"
>         },
>         "optional": false
>       },
>       "environment_id": {
>         "fieldType": {
>           "type": "string"
>         },
>         "optional": false
>       }
>     }
>   },
>   "execution": null
> }
> ```

Native admission analysis is available for this exact declaration.

**Collection: records**

| Contract | Meaning |
| - | - |
| Initial | Enumeration of observed records |
| Changes | Repeated observations of current records |
| Deletions | Deletion detection unsupported |
| Resume | Opaque cursor |
| Gap | Explicit repair required after a gap |
| Retention | Unspecified |

> **Complete native profile**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "movement": {
>     "exchanges": {
>       "records": {
>         "200": {
>           "placement": "retained_bytes",
>           "interpretation": "json",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         }
>       }
>     },
>     "nativeInputLimitBytes": null,
>     "steps": [
>       {
>         "id": "acquire.1",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "exchange records",
>           "limitBytes": null
>         }
>       },
>       {
>         "id": "retain.1",
>         "inputs": [
>           "acquire.1"
>         ],
>         "action": {
>           "operation": "retain",
>           "subject": "acquisition evidence",
>           "reason": "recovery",
>           "release": "acquisition_custody"
>         }
>       },
>       {
>         "id": "interpret.1",
>         "inputs": [
>           "retain.1"
>         ],
>         "action": {
>           "operation": "interpret",
>           "subject": "acquired input",
>           "produces": "records"
>         }
>       },
>       {
>         "id": "materialize.1",
>         "inputs": [
>           "interpret.1"
>         ],
>         "action": {
>           "operation": "materialize",
>           "subject": "source rows",
>           "reason": "serving",
>           "release": "replacement"
>         }
>       },
>       {
>         "id": "publish.1",
>         "inputs": [
>           "materialize.1"
>         ],
>         "action": {
>           "operation": "publish",
>           "subject": "source rows",
>           "visibility": "with_acquisition"
>         }
>       }
>     ]
>   },
>   "initial": "enumeration",
>   "changes": "observations",
>   "deletions": "unsupported",
>   "resume": "opaque_cursor",
>   "retentionMs": null,
>   "gap": "explicit_repair",
>   "limits": {
>     "http_response_bytes": "524288"
>   },
>   "restrictions": [],
>   "commands": {
>     "decide": {
>       "target": "records",
>       "delivery": "single_attempt",
>       "condition": "unconditional",
>       "replayWindowMs": null,
>       "maxDeliveryHours": "1",
>       "providerEnforcedExpiry": false
>     },
>     "requestCancellation": {
>       "target": "records",
>       "delivery": "single_attempt",
>       "condition": "unconditional",
>       "replayWindowMs": null,
>       "maxDeliveryHours": "1",
>       "providerEnforcedExpiry": false
>     },
>     "start": {
>       "target": "records",
>       "delivery": "single_attempt",
>       "condition": "unconditional",
>       "replayWindowMs": null,
>       "maxDeliveryHours": "1",
>       "providerEnforcedExpiry": false
>     }
>   }
> }
> ```

**Commands**

| Command | Target | Condition | Delivery |
| - | - | - | - |
| `decide` | records | Unconditional | Single dispatch attempt |
| `requestCancellation` | records | Unconditional | Single dispatch attempt |
| `start` | records | Unconditional | Single dispatch attempt |

> **Commands, occurrences and artifacts**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "records": {
>     "records": {
>       "protocol": "record_observation",
>       "coverage": "records",
>       "consistency": "observations",
>       "atomicity": "record",
>       "history": "observations",
>       "recordRefresh": false,
>       "reconciliation": false,
>       "notifications": false,
>       "snapshotMaxRows": null,
>       "profile": {
>         "movement": {
>           "exchanges": {
>             "records": {
>               "200": {
>                 "placement": "retained_bytes",
>                 "interpretation": "json",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               }
>             }
>           },
>           "nativeInputLimitBytes": null,
>           "steps": [
>             {
>               "id": "acquire.1",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "exchange records",
>                 "limitBytes": null
>               }
>             },
>             {
>               "id": "retain.1",
>               "inputs": [
>                 "acquire.1"
>               ],
>               "action": {
>                 "operation": "retain",
>                 "subject": "acquisition evidence",
>                 "reason": "recovery",
>                 "release": "acquisition_custody"
>               }
>             },
>             {
>               "id": "interpret.1",
>               "inputs": [
>                 "retain.1"
>               ],
>               "action": {
>                 "operation": "interpret",
>                 "subject": "acquired input",
>                 "produces": "records"
>               }
>             },
>             {
>               "id": "materialize.1",
>               "inputs": [
>                 "interpret.1"
>               ],
>               "action": {
>                 "operation": "materialize",
>                 "subject": "source rows",
>                 "reason": "serving",
>                 "release": "replacement"
>               }
>             },
>             {
>               "id": "publish.1",
>               "inputs": [
>                 "materialize.1"
>               ],
>               "action": {
>                 "operation": "publish",
>                 "subject": "source rows",
>                 "visibility": "with_acquisition"
>               }
>             }
>           ]
>         },
>         "initial": "enumeration",
>         "changes": "observations",
>         "deletions": "unsupported",
>         "resume": "opaque_cursor",
>         "retentionMs": null,
>         "gap": "explicit_repair",
>         "limits": {
>           "http_response_bytes": "524288"
>         },
>         "restrictions": [],
>         "commands": {
>           "decide": {
>             "target": "records",
>             "delivery": "single_attempt",
>             "condition": "unconditional",
>             "replayWindowMs": null,
>             "maxDeliveryHours": "1",
>             "providerEnforcedExpiry": false
>           },
>           "requestCancellation": {
>             "target": "records",
>             "delivery": "single_attempt",
>             "condition": "unconditional",
>             "replayWindowMs": null,
>             "maxDeliveryHours": "1",
>             "providerEnforcedExpiry": false
>           },
>           "start": {
>             "target": "records",
>             "delivery": "single_attempt",
>             "condition": "unconditional",
>             "replayWindowMs": null,
>             "maxDeliveryHours": "1",
>             "providerEnforcedExpiry": false
>           }
>         }
>       }
>     }
>   },
>   "occurrences": null,
>   "artifacts": {
>     "raw_archive": false,
>     "native_file_transfer_limit_bytes": null,
>     "external_versions": false,
>     "files": {}
>   },
>   "commands": {
>     "decide": {
>       "target": "records",
>       "condition": {
>         "kind": "unconditional"
>       },
>       "delivery": {
>         "kind": "single_attempt",
>         "retention": {
>           "kind": "unknown"
>         },
>         "max_delivery_hours": 1
>       }
>     },
>     "requestCancellation": {
>       "target": "records",
>       "condition": {
>         "kind": "unconditional"
>       },
>       "delivery": {
>         "kind": "single_attempt",
>         "retention": {
>           "kind": "unknown"
>         },
>         "max_delivery_hours": 1
>       }
>     },
>     "start": {
>       "target": "records",
>       "condition": {
>         "kind": "unconditional"
>       },
>       "delivery": {
>         "kind": "single_attempt",
>         "retention": {
>           "kind": "unknown"
>         },
>         "max_delivery_hours": 1
>       }
>     }
>   }
> }
> ```

**Recorded checks**

| Requirement | Scope | Evidence | Result |
| - | - | - | - |
| page-publication-recovery | \{"kind":"collection","name":"records"} | SDK protocol tests and portable checks are separate from native hosted AWS Step Functions qualification, which has not been run. | Execution result unavailable |
| stated-cursor-empty-page-advances | \{"kind":"collection","name":"records"} | SDK protocol tests and portable checks are separate from native hosted AWS Step Functions qualification, which has not been run. | Execution result unavailable |
| stated-cursor-repeat-refused | \{"kind":"collection","name":"records"} | SDK protocol tests and portable checks are separate from native hosted AWS Step Functions qualification, which has not been run. | Execution result unavailable |
| command-response-lost | \{"kind":"command","name":"decide"} | SDK protocol tests and portable checks are separate from native hosted AWS Step Functions qualification, which has not been run. | Execution result unavailable |
| command-response-lost | \{"kind":"command","name":"requestCancellation"} | SDK protocol tests and portable checks are separate from native hosted AWS Step Functions qualification, which has not been run. | Execution result unavailable |
| command-response-lost | \{"kind":"command","name":"start"} | SDK protocol tests and portable checks are separate from native hosted AWS Step Functions qualification, which has not been run. | Execution result unavailable |
| identity-account | \{"kind":"connection"} | Fixture: ./src/connectors/stepfunctions/fixtures/identity.json | passed (2026-10-24T21:36:12.391Z) |

Hosted qualification: **unestablished for this catalog configuration**. Installed connections report their own identity, authority and current status.

## Provider guidance

`stepfunctions.workflow.observed` exposes customer-owned Standard executions through
native HTTP resources. Explicit generated contracts declare inputs, progress,
outputs and named top-level task-token decisions. A release fixes account, region,
immutable state-machine version, ASL digest, epoch and retention policy.

`@bijection/connectors/stepfunctions/adapter` is the optional customer Node runtime.
It uses official SFN/STS clients and a customer-implemented transactional
`WorkflowStore`. The store owns business authorization, private gate/token custody,
one winning decision and an outbox. The bridge retains no execution journal.
Private tokens never appear in source rows or Bijection arguments.

Starts have deterministic identities and original input envelopes. Callback
confirmation requires the exact recorded decision marker in history linked to the
original state entry. Native reconciliation reads only. Missing or truncated
history remains unconfirmed; token closure is not proof. Cancellation establishes
an attributed abort, separately from business cleanup. Runtime status and typed
result publication remain separate.

Read-only deployment checks prove account, exact ASL and declared callback states;
they do not prove write privileges, customer store durability or worker behavior.
No aliases, Express, redrive, arbitrary signals or nested callback discovery.
Attached work forbids deletion/redrive/ID reuse; retain original endpoints,
versions, gates and evidence while native custody needs them. Administrative
intervention requires a new epoch and explicit reassociation.

Portable protocol tests cover response loss, bridge recreation, competing/stale
approvals, missing evidence and execution identity fences. Package fixtures are
separate from native/hosted AWS qualification, which remains unestablished.
The platform `examples/stepfunctions-approval` owns the complete customer
Lambda/ASL/SQL/CloudFormation example and opt-in deployed suite.

## Application helpers

All workflow adapters share one application vocabulary. Object-typed inputs are
named command arguments, optional fields included: adding an optional field
never wraps or renames existing arguments. Other values travel as `input`.
Bijection-owned members are camelCase (`start`, `requestCancellation`); names a
contract declares keep their spelling. Serialized routes, capability keys and
records keep their snake\_case wire names.

`<adapter>.commands(contract)` returns each command's target and argument
validators for `commandPolicy` from `bijection/server`, so a policy module types
its inputs without importing the schema that installs the resource.
`<adapter>.policies(contract, "permissions", { reads })` references one exported
policy per command name (`permissions:decideShipment`, ...). Names follow the
contract; a missing export fails deployment analysis.

`<adapter>.observations.select(rows, { bound })` interprets acquired execution
rows the application read through its own indexed queries. It returns
`current`, `missing`, `conflict` (with its reason) or `exceeded`; it never
invents ordering or infers deletion from absence. The application still decides
business association, actor permission and acceptable freshness.
`<adapter>.trace(...)` resolves a retained call's interaction from the generated
`capabilities` and composes it with an authorized observation.

## Provider references

Provider references and prerequisites are maintained in the connector guidance above. No separate provider-documentation review date is recorded.

## Source and evidence

[Canonical connector source](https://github.com/bijectionhq/component-support/blob/b632604330ce9cbcfe17a5a680ef4fbe80f6f672/packages/connectors/src/connectors/stepfunctions/README.md), [native analysis](https://github.com/bijectionhq/component-support/blob/b632604330ce9cbcfe17a5a680ef4fbe80f6f672/packages/connectors/contract-analysis.json) and [check receipts](https://github.com/bijectionhq/component-support/blob/b632604330ce9cbcfe17a5a680ef4fbe80f6f672/packages/connectors/evidence.json).

Connector artifact: `905888ea276a2a28e36981a79e8142b2547ea451c3e63162cb6915ad4a7d1305`.

The resource declaration examples above are compiled and compared with exact catalog declarations. Recorded checks apply only to their source, declaration and runtime identities. Configure a connection and inspect its status to establish deployment-specific readiness.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.