Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@aws-cdk/aws-sqs: Add readonly deadLetter property to Queue #18083

Closed
1 of 2 tasks
markmansur opened this issue Dec 18, 2021 · 2 comments
Closed
1 of 2 tasks

@aws-cdk/aws-sqs: Add readonly deadLetter property to Queue #18083

markmansur opened this issue Dec 18, 2021 · 2 comments
Labels
@aws-cdk/aws-sqs Related to Amazon Simple Queue Service effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p1

Comments

@markmansur
Copy link
Contributor

markmansur commented Dec 18, 2021

Description

Add a readonly property to Queue to access the dead letter queue (if configured)

Use Case

Sometimes I want access to a queues dead letter queue. For example say I'm building a separate monitoring stack which provisions CloudWatch dashboards/alarms for many SQS queues.

It would be much easier to have a dead letter queue property on each queue versus having to maintain code that maps each queue to it's dead letter queue.

For example

// Create deadletter queue
const deadletterQueue = new sqs.Queue(this, 'MyDeadLetterQueue');

// create SQS queue
const queue = new sqs.Queue(this, 'MySQSQueue', {
  deadLetterQueue: {
    queue: deadletterQueue,
    maxReceiveCount: 3
  }
});

// Want to be able to access dead letter queue as a property
const dlq = queue.deadLetterQueue;

Proposed Solution

Add an optional readonly property to the Queue class to access the dead letter queue config, if one is configured

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@markmansur markmansur added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2021
@github-actions github-actions bot added the @aws-cdk/aws-sqs Related to Amazon Simple Queue Service label Dec 18, 2021
@njlynch njlynch added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 30, 2021
@njlynch
Copy link
Contributor

njlynch commented Dec 30, 2021

Sure, this sounds reasonable. I would start just adding it to Queue, and determine if there's a reasonable use case for adding to IQueue as a follow-up.

We welcome community contributions! If you are able, we encourage you to contribute.

@njlynch njlynch removed their assignment Dec 30, 2021
@njlynch njlynch added the good first issue Related to contributions. See CONTRIBUTING.md label Dec 30, 2021
mergify bot pushed a commit that referenced this issue Jan 4, 2022
feat(@aws-cdk/aws-sqs): add DLQ readonly property

motivation is to be able to read the DLQ properties after the queue as been created. Such as referencing it in a different stack.

#18083  
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
feat(@aws-cdk/aws-sqs): add DLQ readonly property

motivation is to be able to read the DLQ properties after the queue as been created. Such as referencing it in a different stack.

aws#18083  
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-sqs Related to Amazon Simple Queue Service effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p1
Projects
None yet
Development

No branches or pull requests

2 participants