Choice State not pointing to Next State - AWS



我有以下步骤函数。选择状态下的执行失败。

"States": {
"Process": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:dummy1",
"OutputPath": "$",
"Next": "ChoiceStatePre"
},
"ChoiceStatePre": {
"Type": "Choice",
"Choices": [{
"Variable": "$.status_pre",
"Next": "Series0",
"NumericEquals": 1
}, {
"Variable": "$.status_pre",
"Next": "MatchStatePre",
"NumericEquals": 8
}]
},
"MatchStatePre": {
"Type": "Task",
"Next": "PreProcess",
"Resource": "arn:aws:states:us-east-1:123:activity:dummy2"
},
"Series0": {
"Resource": "arn:aws:lambda:us-east-1:123:function:dummy3",
"Type": "Task",
"InputPath": "$.seq0.step0",
"ResultPath": "$.seq0.step0",
"OutputPath": "$",
"Next": "ChoiceStateTrigger0"
}
}

错误-

{
"error": "States.Runtime",
"cause": "An error occurred while executing the state 'ChoiceStatePre' 
(entered at the event id #7). Failed to transition out of the state. The 
state does not point to a next state."
}

我已经有了下一个状态,但错误表明选择状态没有指向任何下一个州。

在查看"ChoiceStatePre"时,我没有看到默认状态。这似乎是这次失败的根本原因。请添加默认状态,然后重试。类似这样的东西:

"默认状态":{"类型":"失败","原因":"没有匹配!"}

最新更新