aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.71k stars 3.93k forks source link

kinesis: model AWS::Kinesis::StreamConsumer (L2 construct) #32050

Open humanzz opened 2 weeks ago

humanzz commented 2 weeks ago

Describe the feature

AWS::Kinesis::StreamConsumer is not covered by an L2 construct.

StreamConsumer enables enhanced fan out.

Having been waiting for cloudformation to model kinesis resource policies, to leverage that for a cross-account lambda consumer, I saw that in 2.166.0 release, that the cfn resource has been introduced, and covered by an L2 construct, and utility methods in stream but realized that StreamConsumer is unmodeled in cdk.

This is a request for AWS::Kinesis::StreamConsumer to be covered by an L2 construct, including resource policy utility methods and lambda event sources

Use Case

Cross-account lambda kinesis conumer with enhanced fan out

Proposed Solution

No response

Other Information

No response

Acknowledgements

CDK version used

2.166.0

Environment details (OS name and version, etc.)

macOS

ashishdhingra commented 2 weeks ago

CDK Lib already has L1 construct CfnStreamConsumer. Perhaps something that could be supported at Stream L2 construct level, like exposing a method named registerConsumer().

humanzz commented 2 weeks ago

I think a couple of things to consider

Thing is, given how simple the StreamConsumer construct would be, am not sure that an RFC is required. @ashishdhingra If I get time to make a PR, will I be faced with saying an RFC is required?

humanzz commented 2 weeks ago

Just an update, I'm working on a PR for this