CDK constructs for Kinesis Delivery stream to consume from MSK topic


As of Sept, 2023 kinesis firehose supports creating delivery stream to consume MSK Topic data and store that into s3 with partitioning. Is there a way to configure this in CDK as well ? Looking for some examples. Thanks

1 Answer

Create a MSK cluster using the MskConstruct:

const cluster = new Msk.Cluster(this, 'MyCluster', {
  // configuration 
Create a Firehose delivery stream using the FirehoseConstruct and specify the MSK cluster as the source:

const stream = new Firehose.CfnDeliveryStream(this, 'MyStream', {
  deliveryStreamType: 'KinesisStreamAsSource',
  kinesisStreamSourceConfiguration: {
    kinesisStreamArn: cluster.kinesisStreamArn,
    roleArn: // IAM role 

Specify the S3 destination configuration for the stream.

Add appropriate IAM permissions and roles.

Deploy the CDK app.

profile picture
answered 3 months ago
  • There is no property in MSK cluster called :- cluster.kinesisStreamArn

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions