-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add suport for RedriveAllowPolicy in the Queue construct #19766
Comments
Am I right in thinking this would fix the "Change permissions and CloudTrail update for SQS Dead-letter queue (DLQ) redrive " prompt emails that AWS have started sending out? |
…ues (#28745) This PR allows for the configuration of constraints on source queues that can designate this queue as their dead letter queue. ```ts declare const sourceQueue: sqs.IQueue; // Only the sourceQueue can specify this queue as the dead-letter queue. const queue1 = new sqs.Queue(this, 'Queue1', { redriveAllowPolicy: { sourceQueues: [sourceQueue], } }); // No source queues can specify this queue as the dead-letter queue. const queue2 = new sqs.Queue(this, 'Queue2', { redriveAllowPolicy: { redrivePermission: sqs.RedrivePermission.DENY_ALL, } }); ``` Closes #19766. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…ues (aws#28745) This PR allows for the configuration of constraints on source queues that can designate this queue as their dead letter queue. ```ts declare const sourceQueue: sqs.IQueue; // Only the sourceQueue can specify this queue as the dead-letter queue. const queue1 = new sqs.Queue(this, 'Queue1', { redriveAllowPolicy: { sourceQueues: [sourceQueue], } }); // No source queues can specify this queue as the dead-letter queue. const queue2 = new sqs.Queue(this, 'Queue2', { redriveAllowPolicy: { redrivePermission: sqs.RedrivePermission.DENY_ALL, } }); ``` Closes aws#19766. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ues (#28745) This PR allows for the configuration of constraints on source queues that can designate this queue as their dead letter queue. ```ts declare const sourceQueue: sqs.IQueue; // Only the sourceQueue can specify this queue as the dead-letter queue. const queue1 = new sqs.Queue(this, 'Queue1', { redriveAllowPolicy: { sourceQueues: [sourceQueue], } }); // No source queues can specify this queue as the dead-letter queue. const queue2 = new sqs.Queue(this, 'Queue2', { redriveAllowPolicy: { redrivePermission: sqs.RedrivePermission.DENY_ALL, } }); ``` Closes #19766. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the feature
The
CfnQueue
construct the "source queue" policy for a DLQ redrive to be specified using the redriveAllowPolicy parameter but theQueue
construct does not support this. Requesting to please add this support.Use Case
SQS recently launched a feature to allow redriving DLQs via the AWS console which will help to make it super easy to redrive DLQs but it also creates a possibility for error when selecting the destination queue and a human can accidentally choose the wrong queue to redrive to. To mitigate this, SQS allows for a DLQ to be configured with a "source queue" that the messages will always be re-drived to so that selection does not need to be made for every redrive. We want to use that for our CDK-managed queues to avoid mistakes during redrives.
Proposed Solution
I propose making following changes:
redriveAllowPolicy
to theQueueProps
construct, with typeIRedriveAllowPolicy
IRedriveAllowPolicy
with 1 method to generate the corresponding CFN parametersIRedriveAllowPolicy
to "AllowAll", "DenyAll" and "ByQueue" policy as mentioned in the CfnQueueredriveAllowPolicy
when creating theCfnQueue
during the constructor forQueue
Other Information
No response
Acknowledgements
CDK version used
1.141
Environment details (OS name and version, etc.)
AmazonLinux2, Windows 10
The text was updated successfully, but these errors were encountered: