fakecloud icon indicating copy to clipboard operation
fakecloud copied to clipboard

Step Functions: nested states:startExecution.sync:2 rejects the ASL PascalCase StateMachineArn

Open fivejjs opened this issue 1 month ago • 1 comments

Summary

A nested execution started with states:startExecution.sync:2 reads the parameter that carries the child ARN as the wire-model key (stateMachineArn) instead of the ASL-visible key (StateMachineArn). A definition that follows the AWS documentation fails with Sfn.ValidationException: StartExecution failed: stateMachineArn is required.

Observed on fakecloud 0.51.0 (linux-amd64 release binary, SHA-256 verified), but the behavior comes from the Step Functions interpreter, so the container image is likely the same.

Reproduction

Two state machines; the child is a single Pass.

Child:

{"StartAt":"P","States":{"P":{"Type":"Pass","Result":{"child":"ok"},"End":true}}}

Parent (the shape AWS documents):

{"StartAt":"N","States":{"N":{
  "Type":"Task",
  "Resource":"arn:aws:states:::states:startExecution.sync:2",
  "Parameters":{"StateMachineArn":"<child ARN>","Input":{"a":1}},
  "End":true}}}

StartExecution on the parent:

  • Expected: the child runs and the parent receives its output (.sync:2 returns the child output as JSON).
  • Actual: parent execution FAILED, error Sfn.ValidationException, cause StartExecution failed: stateMachineArn is required.

Control: with the non-ASL lowercase key ("stateMachineArn": "<child ARN>") the same machine SUCCEEDS, which is why this reads as a parameter-name mapping issue rather than a missing integration.

The parameter name cannot be changed on our side: StateMachineArn is the ASL spelling AWS documents and accepts.

Impact

Blocks using fakecloud for any lifecycle/parent machine that composes child executions synchronously (.sync/.sync:2), which is a common orchestration shape.

fivejjs avatar Nov 04 '26 12:11 fivejjs

Fixed in #2783, which just merged. The Step Functions task integrations now follow the recorded AWS behavior, including the validation AWS applies: a lowercase stateMachineArn parameter and a Distributed Map ItemReader without ReaderConfig where AWS requires one are now refused the same way AWS refuses them. It ships in the next release. Thanks for the report.

vieiralucas avatar Nov 10 '26 09:11 vieiralucas