AWS Step Function返回条件路径引用错误 [英] AWS Step Function returns condition path references error

查看:174
本文介绍了AWS Step Function返回条件路径引用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AWS Step Functions中的两个选项来运行step函数.

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": "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

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

这篇关于AWS Step Function返回条件路径引用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆