Shreyas arya

Generation

generate functionThu, 09 Feb 2023

When requests to Step Function fail, Workflow Service performs exponential backoff retries to notify Step Function service. Number of retries = 3 The total duration of all attempts doesn't exceed 10 seconds.

Script function exponentialRetryPolicy(context) { var retries = 3; var backoffRate = 2.0; var retryInterval = 1000; // 1s var maxInterval = 10000; // 10s var maxElapsedTime = 10000; // 10s var errorCodes = [ "RequestEntityTooLarge", "Throttling", "ThrottlingException", "RequestLimitExceeded", "LimitExceededException", "InternalServerError", "ServiceUnavailable" ]; return new ExponentialRetryPolicy(errorCodes, retryInterval, maxInterval, maxElapsedTime, retries, backoffRate, context); }

Questions about programming?Chat with your personal AI assistant