The theory behind the implementation is described in this article: Exponential backoff and jitter
This serverless application deploys an AWS lambda function that replays each message of the specified DLQ with an exponential backoff and jitter. After some unseccessful retries the function throws an error which can move the message to a secondary DLQ.
Deploying the application with the Serverless Application Repository
- Create an AWS account if you do not already have one
- Go to the app's page on the sqs-dlq-replay-backoff Serverless Application Repository page and click "Deploy"
- Provide the required application parameters and click "Deploy"
Deploying the application leveraging SAM (AWS Serverless Application Model):
- Create an AWS account if you do not already have one
- Make sure to have sam cli installed.
- Go to the directory you just cloned
- Do a
sam build --use-container
(you need to have docker started) - Do a
sam --deploy guided
(it will help you go through the different steps and also parameters available in the stack to configure the jitter and backoff)
ReplayFunctionArn
- My ARN for the Lambda function if needed to be used externally.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.