AWS Step Function returns 条件路径引用错误
AWS Step Function returns condition path references error
我是 运行 step functions,在 AWS Step Functions 中有两个选择。
...
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$[0].input",
"NumericEquals":1,
"Next": "FirstMatchState"
},
{
"Variable": "$[0].input",
"NumericEquals":2,
"Next": "SecondMatchState"
}
],
"Default": "DefaultState"
},
...
使用此输入进入选择状态
//ChoiceStateEntered
{
"name": "ChoiceState",
"input": 1
}
抛出错误
{
"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."
}
简单地说,您不需要 $[0],而是 $.根据您的输入,您应该使用 $.input 而不是 $[0].input
我是 运行 step functions,在 AWS Step Functions 中有两个选择。
...
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$[0].input",
"NumericEquals":1,
"Next": "FirstMatchState"
},
{
"Variable": "$[0].input",
"NumericEquals":2,
"Next": "SecondMatchState"
}
],
"Default": "DefaultState"
},
...
使用此输入进入选择状态
//ChoiceStateEntered
{
"name": "ChoiceState",
"input": 1
}
抛出错误
{
"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."
}
简单地说,您不需要 $[0],而是 $.根据您的输入,您应该使用 $.input 而不是 $[0].input