Skip to main content

A redrive construct to use with an SQS queue and it's dead letter queue

Project description

SQS Redrive

This construct creates a Lambda function that you can use to move SQS messages from one queue to another. This is often used for moving Dead Letter Queue messages back to the original queue for reprocessing.

This is a pre-release!

This is a quick first-draft. All the options that will likely need to be added to accomodate a large number of use-cases are still needed. If you'd like to make requests or help update this construct, please open an Issue or a PR.

What Gets Created

A Lambda function and related policy which moves SQS queue messages from one queue to another.

Example

This creates two external queues and then creates the Lambda to move from the deadLetterQueue to the mainQueue

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.core as cdk
from ...lib.sqs_redrive import SqsRedrive
from aws_cdk.aws_sqs import Queue

app = cdk.App()
stack = cdk.Stack(app, "test-stack")

main_queue = Queue(stack, "main-queue")
dead_letter_queue = Queue(stack, "dlq-queue")
SqsRedrive(stack, "SqsRedriveConstructStack",
    main_queue=main_queue,
    dead_letter_queue=dead_letter_queue
)

Note: this is the integration test (cdk synth).

Input Properties

What are the inputs to your constructs?

property description example
mainQueue The destination queue for the messages. new Queue(stack, 'main-queue')
deadLetterQueue The source queue of the messages. new Queue(stack, 'dead-letter-queue')

Design Notes

This is early design and serves one very specific use-case. If you have suggestions on how to make this better, please open an Issue in Github.

Contributing

Please open Pull Requests and Issues on the Github Repo.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbonig.sqs-redrive-1.60.2.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mbonig.sqs_redrive-1.60.2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file mbonig.sqs-redrive-1.60.2.tar.gz.

File metadata

  • Download URL: mbonig.sqs-redrive-1.60.2.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for mbonig.sqs-redrive-1.60.2.tar.gz
Algorithm Hash digest
SHA256 5b5ce84264a6a7fe695bb71210265da07f81f975fa7f04261fc33a6de62df733
MD5 bb8ddd49184ba62b381084ba1aad20ea
BLAKE2b-256 eeb1d258f7bd05658c5f76933b92f76589f6cac53f855e36889caad5301b4077

See more details on using hashes here.

File details

Details for the file mbonig.sqs_redrive-1.60.2-py3-none-any.whl.

File metadata

  • Download URL: mbonig.sqs_redrive-1.60.2-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for mbonig.sqs_redrive-1.60.2-py3-none-any.whl
Algorithm Hash digest
SHA256 98703e326ffd5095c0f17ab428d5e499099fb8993a4608500d7013a14a9b3b2a
MD5 e4527eb40edeb9ca1191807e28f99cce
BLAKE2b-256 07da26d35dedf879e2e3b2c2103cc2f5f589139b8a60ee09fc1263786c4a7e9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page