Skip to content

bug: Step Functions $$.StateMachine.Name and $$.State.Name are not supported #11950

@peter-smith-phd

Description

@peter-smith-phd

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The following state machine fails to parse correctly:

{
  "StartAt": "fail",
  "States": {
    "fail": {
      "Type": "Fail",
      "ErrorPath": "$$.State.Name",
      "CausePath": "$$.StateMachine.Name"
    }
  }
}

The incorrect output is:

An error occurred (InvalidDefinition) when calling the CreateStateMachine operation: ASLParserException ['line 6:19, at "$$.State.Name", no viable alternative at input \'"ErrorPath":"$$.State.Name"\'', 'line 7:19, at "$$.StateMachine.Name", no viable alternative at input \'"CausePath":"$$.StateMachine.Name"\'']

Expected Behavior

The ASL should parse correctly, and the state machine should return the state's name, and the state machine's name.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker-compose up

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

awslocal stepfunctions create-state-machine --name "Fail_errors" --definition file://file.asl.json --role-arn arn:aws:iam::000000000000:role/Admin

Environment

- OS: Amazon Linux
- LocalStack:
  LocalStack version: 4.0.3.dev22
  localstack-main | LocalStack build date: 2024-11-27
  localstack-main | LocalStack build git hash: 0e01610bb

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions