This serverless app redrives the messages from an SQS DLQ (Dead Letter Queue) back to its source queue. This is helpful when you fix the bug that was causing the messages ending up in DLQ and you need to put the messages back to process.
- The app creates a Lambda function that can redrive the messages from an SQS DLQ to its source queues.
- The app can redrive given number of messages from any given SQS DLQ to its source queues.
- Create an AWS account if you do not already have one and login
- Go to the app's page on the Serverless Application Repository and click "Deploy"
- Provide the required app parameters (see parameter details below) and click "Deploy"
LogLevel
(optional) - Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc. Default: INFO
SQSDLQRedriverName
- SQS DLQ Redriver Lambda function name.SQSDLQRedriverArn
- SQS DLQ Redriver Lambda function ARN.
You can use the app to redrive messages from any DLQ. To redrive the messages, you will invoke the SQS DLQ Redriver Lambda with the expected input. See here on how to invoke a Lambda function.
The SQS DLQ Redriver Lambda accepts the following input:
{
"DLQName": String,
"MaxMessageCount": Integer
}
DLQName
(required) - The name of the DLQ queue.MaxMessageCount
(required) - Maximum number of messages to process
Example:
{
"DLQName": "my-dlq",
"MaxMessageCount": 100
}
The SQS DLQ Redriver Lambda returns the following output:
{
"ProcessedMessageCount": Integer
}
ProcessedMessageCount
(required) - Number of messages that has been processed
Example:
{
"ProcessedMessageCount": 100
}
This code is made available under the MIT license. See the LICENSE file.