I have a simple AWS state machine with two task states that execute C# lambda functions, and one pass state error handler to handle "States.ALL":
{
"Comment": "StateMachine1",
"StartAt": "step1",
"States": {
"step1": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-2:0000:function:step1",
"Catch": [ {
"ErrorEquals": ["States.ALL"],
"Next": "CatchAllFallback"
} ],
"Next": "step2"
},
"step2": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-2:0000:function:step2",
"Catch": [ {
"ErrorEquals": ["States.ALL"],
"Next": "CatchAllFallback"
} ],
"End": true
},
"CatchAllFallback": {
"Type": "Pass",
"Result": "This is a fallback from any error code",
"End": true
}
}
}
When one of the steps fails, I get the following as the input to my "CatchAllFallback":
"Error": "Lambda.Unknown",
"Cause": "The cause could not be determined because Lambda did not return an error type."
When I review the Cloudwatch logs, I see that the step timed out. My question is: how do I get that information in my error handler instead of just "Lambda.Unknown"? I know it must be possible, but after spending hours searching the web, I can NOT figure out how to do it. Any advice would be appreciated.