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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mbonig.sqs-redrive-1.60.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30ffc7f884b80805ad813be2425e36dd0bb18208701d2090067e74543d61be0e |
|
MD5 | b2e4608da8557b4483ce07bb67c28a84 |
|
BLAKE2b-256 | e258fff94212f3ce97a0df6b5a56d58465cf6b3f39b51d6561f9b00c98e00f4a |
Hashes for mbonig.sqs_redrive-1.60.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df531d9b30fb70687e57bf1db1b1ace685971dac8bc63f4d7bfcf76d2315fd6 |
|
MD5 | 93f5679a6a6b8a9040816df06ec347e6 |
|
BLAKE2b-256 | 2e45361578bf1408bbaf6463e0412433909a6738abc21d15ca121286a66e6c9c |