running
我有一个 Step Function 在运行两次后陷入状态。前 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
}
}
}