Skip to content

Add suport for RedriveAllowPolicy in the Queue construct #19766

@VarshaVid

Description

@VarshaVid

Describe the feature

The CfnQueue construct the "source queue" policy for a DLQ redrive to be specified using the redriveAllowPolicy parameter but the Queue 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:

  1. Add a new parameter called redriveAllowPolicy to the QueueProps construct, with type IRedriveAllowPolicy
  2. Define IRedriveAllowPolicy with 1 method to generate the corresponding CFN parameters
  3. Define 3 implementations of IRedriveAllowPolicy to "AllowAll", "DenyAll" and "ByQueue" policy as mentioned in the CfnQueue
  4. Populate the redriveAllowPolicy when creating the CfnQueue during the constructor for Queue

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

1.141

Environment details (OS name and version, etc.)

AmazonLinux2, Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-sqsRelated to Amazon Simple Queue Serviceeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions