Step Function Local Accessing Context Object causes SCHEMA_VALIDATION_FAILED

0

When trying to create a state machine where a state tries to access the context object. Step Function Local is returning SCHEMA_VALIDATION_FAILED on the create-state-machine cli command.

Example Definition which causes the error

{
  "StartAt": "Init",
  "States": {
    "Init": {
      "Type": "Pass",
      "ResultPath": "$.test",
      "Parameters": {
        "start.$": "$$.State.EnteredTime"
      },
      "Next": "Finished"
    },
    "Finished": {
      "Type": "Succeed"
    }
  }
}

The response from the CLI create-state-machine call to Step Function Local

An error occurred (InvalidDefinition) when calling the CreateStateMachine operation: Invalid State Machine Definition: ''SCHEMA_VALIDATION_FAILED: The value for the field 'start.$' must be a valid JSONPath or a valid intrinsic function call at /States/Init/Parameters''

Is it expected that Step Function Local doesn't support the Context Object or is this an unexpected bug?

Thanks

질문됨 2년 전2340회 조회
1개 답변
0

The issue was actually caused by trying to provide the definition inside double quotes via the aws cli create-state-machine command when talking to AWS SFN and SFN Local.
Changing this to single quotes wrapping around the json unescaped has resolved this issue

Currently unsure what the issue is with the double quotes, but assuming it is some form of escaping that is required

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠