Skip to content

Redriving messages from an AWS SQS DLQ back to its source queues.

License

Notifications You must be signed in to change notification settings

honglu/aws-sqs-dlq-redriver

Repository files navigation

aws-sqs-dlq-redriver Build Status

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.

App Architecture

App Architecture

  1. The app creates a Lambda function that can redrive the messages from an SQS DLQ to its source queues.
  2. The app can redrive given number of messages from any given SQS DLQ to its source queues.

Installation Instructions

  1. Create an AWS account if you do not already have one and login
  2. Go to the app's page on the Serverless Application Repository and click "Deploy"
  3. Provide the required app parameters (see parameter details below) and click "Deploy"

App Parameters

  1. LogLevel (optional) - Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc. Default: INFO

App Outputs

  1. SQSDLQRedriverName - SQS DLQ Redriver Lambda function name.
  2. SQSDLQRedriverArn - SQS DLQ Redriver Lambda function ARN.

Usage

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.

Input

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
}

Output

The SQS DLQ Redriver Lambda returns the following output:

{
    "ProcessedMessageCount": Integer
}
  • ProcessedMessageCount (required) - Number of messages that has been processed

Example:

{
    "ProcessedMessageCount": 100
}

License Summary

This code is made available under the MIT license. See the LICENSE file.

About

Redriving messages from an AWS SQS DLQ back to its source queues.

Resources

License

Stars

Watchers

Forks

Packages

No packages published