Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

351
Visualizações
AWS Step Functions is not catching States.Runtime error

The below step function is executed in aws and when there is a missing of a required parameter it cancel the flow and throws States.Runtime Error. This is in catch phase of the step function but it is not catching the error as stated.

Defined Step function is as below,

{
  "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"
    }
  }
}

Below is the step function, enter image description here

And the error thrown is as below, enter image description here

Runtime error is not executing Log failed module.

{
   "ErrorEquals": [
       "States.Runtime"
    ],
    "ResultPath": "$.taskresult",
    "Next": "Log Failed Module"
  },

Is this AWS error or something wrong with the configuration which is done here or is there any other way to validate parameters in AWS Step Functions

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

From 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.

over 4 years ago · Santiago Trujillo Relatório

0

Your state machine is expecting the following as input:

"Parameters": {
  "body": {
    "itemID.$": "$.itemID",
    "functionName.$": "$.stepFunctionName ",
    "executionARN.$": "$$.Execution.Id",
    "complete": false,
    "inprogress": true,
    "error": false
  }
},

You need to pass them when you start a new execution instead of:

{
  "Comment": "Insert your JSON here"
}

Which you are currently passing because it comes by default as the input body of a new execution in the AWS Console.

Read more about InputPath and Parameters here: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html

over 4 years ago · Santiago Trujillo Relatório

0

I have the same problem.

I am beginning to think that the runtime error happens when the input path is processed, and before the catcher can be initialized. This means that try / catch to test for parameters present in the input is not possible. I also tried ChoiceState, to no avail.

So I think there is no solution but to provide every parameter you refer to in the state machine definition. But the documentation is not clear on this.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda