For StepFunctions, can we have both Retry and Catch working together on the exhausted case?
Here is my use case
- Job fails
- Retry
- Retries exhausted, goes to Catch
- Catch all errors, move to next job, and update the DB table to mark this job failed (another task)
- Or on success from 1st time run or retries, move to the next job
"ExecuteMyJob": {
"Type": "Task",
"Resource": "arn:aws:states:::glue:startJobRun.sync",
"Parameters": {
"JobName.$": "$.jobName",
"Arguments.$": "$.jobArguments"
},
"Retry" : [{
"ErrorEquals": [ "States.TaskFailed", "States.Runtime" ],
"MaxAttempts": 3,
"IntervalSeconds": 60,
"BackoffRate": 2
}],
"Catch": [{
"ErrorEquals": [ "States.ALL" ],
"Next": "MarkJobFailOnDbTable"
}],
"Next": "NextJobOnPreviousSuccess"
}