Step Functions
Full ASL interpreter, cross-service task integrations, execution history.
fakecloud implements 37 of 37 Step Functions operations at 100% Smithy conformance, including a full ASL (Amazon States Language) interpreter.
Supported features
- State machines — CRUD, versions, aliases, tags. Both
STANDARDandEXPRESStypes. - Executions —
StartExecution(async),StartSyncExecution(real synchronous Express runner that blocks until the state machine terminates and returns the final output),StopExecution,DescribeExecution,GetExecutionHistory. - ASL states — Pass, Task, Choice, Wait, Parallel, Map, Succeed, Fail
- Retry and Catch — full retry logic with exponential backoff, catch clauses with error filters
- JSONPath and JSONata — both query languages for state input/output
- Task integrations — Lambda (
invoke,invoke.waitForTaskToken), SQS (sendMessage), SNS (publish), EventBridge (putEvents), DynamoDB (getItem/putItem/updateItem/deleteItem), and nested Step Functions (states:startExecutionasync +states:startExecution.syncblocking) —.syncwaits for the child execution to terminate and propagates its output or failure to the parent. - Map state — parallel item processing with concurrency control. Supports distributed mode (
ItemProcessor.ProcessorConfig.Mode=DISTRIBUTED) withMaxConcurrency,ToleratedFailurePercentage, andItemReaderover S3 (JSON/JSONL/CSV manifests). - Parallel state — concurrent branch execution
- Activities — real worker pool. A
Taskstate with an activity ARN inserts a pending task;GetActivityTasklong-polls (up toFAKECLOUD_SFN_GET_ACTIVITY_TIMEOUT_SECS, default 5s) for the next pending task;SendTaskSuccess/SendTaskFailureresolve the workflow.HeartbeatSecondsandTimeoutSecondsare enforced, and tasks dispatched past their timeout are reaped automatically. - Express logging —
EXPRESSstate machines withLoggingConfiguration.Level=ALL|ERROR|FATALemitExecutionStarted/ExecutionSucceeded/ExecutionFailedevents into the configured CloudWatch Logs destination. - State machine execution history — full event log per execution
- Error handling —
States.ALL,States.TaskFailed,States.Timeout,States.HeartbeatTimeout, custom error names
Protocol
JSON protocol. X-Amz-Target header, JSON body, JSON responses.
Introspection
GET /_fakecloud/stepfunctions/executions— list all executions with status, input, output, and timestampsPOST /_fakecloud/stepfunctions/enqueue-activity-task— directly insert a pending activity task (skipping a state-machine execution). Body:{"activityArn": "...", "input": "{}", "heartbeatSeconds": 60, "timeoutSeconds": 300}. Returns{"taskToken": "..."}. Useful for testing worker pool clients without authoring a full ASL workflow.
Cross-service delivery
- Step Functions -> Lambda / SQS / SNS / EventBridge / DynamoDB — Task states invoke functions, send messages, publish events, and read/write items
- Step Functions -> Step Functions — Nested executions via
states:startExecutionandstates:startExecution.sync. The.syncvariant blocks the parent until the child reaches a terminal state, surfacing the child's output or failure (States.TaskFailedwith child error/cause) back to the parent task. - Step Functions -> CloudWatch Logs — Express state machine execution events stream to the configured log group.
Why this matters
Most emulators stub Step Functions or support a tiny subset of the ASL spec. fakecloud runs the full interpreter — your state machine definitions execute with real branching, retries, catches, and task integrations. This lets you test orchestration logic end-to-end without touching real AWS.