我有一个Step Function,在它运行两次后卡在running
状态。前2次按预期运行。
该函数检查快照的状态并更新DynamoDB表中的记录。如果快照仍处于creating
状态,则会引发异常。
{
"error": "SnapshotToolException",
"cause": "{\"errorMessage\": \"There are still 1 snapshots in creating state.\", \"errorType\": \"SnapshotToolException\", \"stackTrace\": [[\"/var/task/lambda_function.py\", 5, \"lambda_handler\", \"checkSnapshotRecordsState()\"], [\"/var/task/dynamodb_control_utils.py\", 92, \"checkSnapshotRecordsState\", \"raise SnapshotToolException(log_message)\"]]}"
}
{
"Comment": "Triggers check DynamoDB snapshots records lambda function",
"StartAt": "CheckSnapshots",
"States": {
"CheckSnapshots": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:ACCOUNT:function:checkDynamoDBSnapshotRecords",
"Retry": [
{
"ErrorEquals": ["SnapshotToolException"],
"IntervalSeconds": 120,
"MaxAttempts": 20,
"BackoffRate": 30
}
],
"End": true
}
}
}
答案 0 :(得分:0)
将"BackoffRate": 30
更改为"BackoffRate": 30.0
。似乎在末尾省略.0
小数表示步骤函数等待30分钟而不是文档建议的30秒。