amazon-web-services - AWS Step Functions 未捕获 States.Runtime 错误

标签 amazon-web-services error-handling runtime-error aws-step-functions

下面的 step 函数在 aws 中执行,当缺少必需的参数时,它会取消流程并抛出 States.Runtime 错误。这是在 step 函数的 catch 阶段,但它没有像所述的那样捕获错误。

定义的阶跃函数如下,

{
  "StartAt": "Log Start Step Function",
  "Comment": "Executed with inputs",
  "States": {
    "Log Start Step Function": {
      "Type": "Task",
      "Resource": "arn:aws:lambda:eu-west-1:0000000:function:update",
      "Parameters": {
        "body": {
          "itemID.$": "$.itemID",
          "functionName.$": "$.stepFunctionName ",
          "executionARN.$": "$$.Execution.Id",
          "complete": false,
          "inprogress": true,
          "error": false
        }
      },
      "Catch": [
        {
          "ErrorEquals": [
            "States.Runtime"
          ],
          "ResultPath": "$.taskresult",
          "Next": "Log Failed Module"
        },
        {
          "ErrorEquals": [
            "States.ALL"
          ],
          "ResultPath": "$.taskresult",
          "Next": "Log Failed Module"
        }

      ],
      "ResultPath": "$.taskresult",
      "Next": "Evaluate Module PA1"
    }
  }
}

下面是阶跃函数,enter image description here

抛出的错误如下,
enter image description here

运行时错误未执行记录失败的模块。
{
   "ErrorEquals": [
       "States.Runtime"
    ],
    "ResultPath": "$.taskresult",
    "Next": "Log Failed Module"
  },

这是 AWS 错误还是此处完成的配置有问题,或者是否有任何其他方法可以验证 AWS Step Functions 中的参数

最佳答案

来自 https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

A States.Runtime error is not retriable, and will always cause the execution to fail. A retry or catch on States.ALL will not catch States.Runtime errors.

关于amazon-web-services - AWS Step Functions 未捕获 States.Runtime 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62340479/

相关文章:

python - 为 AWS Cognito 使用 python boto3 实现 USER_SRP_AUTH

postgresql - 使用 Tableau 登录 EC2

maven - 如何将 WAR 文件从 s3 部署到 AWS EC2?

android - 如何在 native 输出中获取组件代码

java - 为什么这段代码在 Java 中向我发送 Stackoverflow

java - 我的程序出现运行时错误 : exception in thread "main" java. lang.StringIndexOutOfBoundsException:字符串索引超出范围:27

java - DefaultListModel.clear 错误

ssl - 如何在CloudFormation模板中将预先上传的SSL证书附加到ELB?

forms - Dojo dijit.form.Select验证错误显示

javascript - 如何处理 statusCode 未处理的 ajax 错误?