Reputation: 196
I have a Step Function that gets stuck in running
state after it runs twice. The first 2 times it runs as expected.
The function checks the state of snapshots and updates the records in a DynamoDB table. If the snapshot is still in creating
state, it will raise an exception.
{
"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
}
}
}
Upvotes: 1
Views: 1276
Reputation: 196
Changed the "BackoffRate": 30
to "BackoffRate": 30.0
. Seems that omitting the .0
decimal at the end tells the Step Function to wait 30 minutes as opposed to 30 seconds as the documentation suggested.
Upvotes: 1