我正在使用 AWS CDK 创建一个状态机。而不是默认的重试策略,如下所示:
"Retry": [
{
"ErrorEquals": [
"Lambda.ServiceException",
"Lambda.AWSLambdaException",
"Lambda.SdkClientException"
],
"IntervalSeconds": 2,
"MaxAttempts": 6,
"BackoffRate": 2
}
]
我只想拥有一个看起来像这样的包罗万象的政策:
"Retry": [
{
"ErrorEquals": [
"States.ALL"
],
"IntervalSeconds": 10,
"MaxAttempts": 3,
"BackoffRate": 1.5
}
]
不幸的是,我在部署堆栈时找不到删除默认策略的方法。我的包罗万象只是被添加到重试策略数组的末尾。
"Retry": [
{
"ErrorEquals": [
"Lambda.ServiceException",
"Lambda.AWSLambdaException",
"Lambda.SdkClientException"
],
"IntervalSeconds": 2,
"MaxAttempts": 6,
"BackoffRate": 2
},
{
"ErrorEquals": [
"States.ALL"
],
"IntervalSeconds": 10,
"MaxAttempts": 3,
"BackoffRate": 1.5
}
]
任何人都知道如何摆脱默认策略?