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-events-targets] Add DLQ support for Kinesis Target #31428

Closed
2 tasks
ryanschulz46 opened this issue Sep 12, 2024 · 3 comments · Fixed by #31435
Closed
2 tasks

[aws-events-targets] Add DLQ support for Kinesis Target #31428

ryanschulz46 opened this issue Sep 12, 2024 · 3 comments · Fixed by #31435
Labels
@aws-cdk/aws-events-targets effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p3

Comments

@ryanschulz46
Copy link

ryanschulz46 commented Sep 12, 2024

Describe the feature

This is an available feature through the AWS Console already and is supported in many other target but not Kinesis.

[aws-events] Add support for Rule Dead Letter Queue: #11612
feat(events-targets): Add DLQ support for SQS target: #16417

Use Case

Use aws-cdk-lib/aws-events-targets to create Kinesis Targets, but also support a DLQ for such target

Proposed Solution

Extend aws-cdk-lib/aws-events-targets/kinesis-stream/KinesisStreamProps to extend TargetBaseProps (similar to SQS)

import * as events from 'aws-cdk-lib/aws-events';
import * as event_targets from 'aws-cdk-lib/aws-events-targets';
import * as sqs from 'aws-cdk-lib/aws-sqs';
import * as kinesis from 'aws-cdk-lib/aws-kinesis';

// Create Stream and DLQ
const myKinesisStream = new kinesis.Stream(this, 'MyKinesisStream', {
    streamName: 'my-kinesis-stream',
    streamMode: kinesis.StreamMode.ON_DEMAND,
});
const myDeadLetterQueue = new sqs.Queue(this, 'MyDeadLetterQueue');

// Kinesis Target created with DLQ configured
const myKinesisTarget = new event_targets.KinesisStream(myKinesisStream, {deadLetterQueue: myDeadLetterQueue});


// Example Target Use-case: Connecting EventBus to Kinesis Stream now has DLQ
const myEventBus = new events.EventBus(this, 'MyEventBus', { eventBusName: 'my-event-bus'});

const myEventRule = new events.Rule(this, 'MyEventRule', {
    eventBus: myEventBus,
    eventPattern: ['pattern'],
    targets: [myKinesisTarget],
});

Other Information

No response

Acknowledgements

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

CDK version used

2.149.0

Environment details (OS name and version, etc.)

AL2

@ryanschulz46 ryanschulz46 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 12, 2024
@khushail khushail self-assigned this Sep 12, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Sep 12, 2024
@khushail
Copy link
Contributor

Hi @ryanschulz46 , thanks for reaching out with this request. This would be good to have (#13660)
Contribution from the community are welcome.

@khushail khushail added p3 effort/small Small work item – less than a day of effort and removed p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 12, 2024
@khushail khushail removed their assignment Sep 12, 2024
@mergify mergify bot closed this as completed in #31435 Sep 13, 2024
@mergify mergify bot closed this as completed in 358f231 Sep 13, 2024
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-events-targets effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants