我正在使用AWS步骤函数步骤,更具体地处理错误。
在本文档:https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html中,它提到,如果步骤未能重新尝试该步骤,我们可以使用Retry子句:
"Retry": [ {
"ErrorEquals": [ "States.Timeout" ],
"IntervalSeconds": 3,
"MaxAttempts": 2,
"BackoffRate": 1.5
} ]我可以设置的最大IntervalSeconds和MaxAttempts是多少?我想再试一次2-4天,每4小时再试一次。是否有可能将这些字段设置为这么高的值?示例:
"Retry": [ {
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 14400,
"MaxAttempts": 12,
"BackoffRate": 1
} ]发布于 2021-05-21 23:39:32
IntervalSeconds和MaxAttempts的最大值是99999999。我在文档中没有看到任何提到它的地方,但是您可以通过尝试在控制台或API中创建一个示例状态机来验证。即
{
"Comment": "A Retry example of the Amazon States Language using an AWS Lambda Function",
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Task",
"Resource": "arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME",
"Retry": [
{
"ErrorEquals": ["CustomError"],
"IntervalSeconds": 99999999,
"MaxAttempts": 99999999,
"BackoffRate": 2.0
},
{
"ErrorEquals": ["States.TaskFailed"],
"IntervalSeconds": 99999999,
"MaxAttempts": 99999999,
"BackoffRate": 2.0
},
{
"ErrorEquals": ["States.ALL"],
"IntervalSeconds": 99999999,
"MaxAttempts": 99999999,
"BackoffRate": 2.0
}
],
"End": true
}
}
}https://stackoverflow.com/questions/67641293
复制相似问题