AWS Step Function returns condition path references error

狂风中的少年 提交于 2020-03-05 03:33:26

问题


I am running step functions with two choices in AWS Step Functions.

...
"ChoiceState": {
  "Type" : "Choice",
  "Choices": [
    {
      "Variable": "$[0].input",
      "NumericEquals":1,
      "Next": "FirstMatchState"
    },
    {
      "Variable": "$[0].input",
      "NumericEquals":2,
      "Next": "SecondMatchState"
    }
  ],
  "Default": "DefaultState"
},
...

choice state entered with this input

//ChoiceStateEntered

{
"name": "ChoiceState",
"input": 1
}

Error thrown

{
 "error": "States.Runtime",
 "cause": "An error occurred while executing the state 'ChoiceState'      (entered at the event id #7). Invalid path '$[0].input': The choice state's condition path references an invalid value."
}

回答1:


Simply, you do not need $[0] but $. Per your input, you should use $.input instead of $[0].input



来源:https://stackoverflow.com/questions/46966967/aws-step-function-returns-condition-path-references-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!