Skip to content
v2.275.0

StreamConsumerProps Struct ​

Properties for a Kinesis Stream Consumer.

Example ​

ts
const lambdaRole = new iam.Role(this, 'Role', {
  assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
  description: 'Example role...',
});

const stream = new kinesis.Stream(this, 'MyEncryptedStream', {
  encryption: kinesis.StreamEncryption.KMS,
});
const streamConsumer = new kinesis.StreamConsumer(this, 'MyStreamConsumer', {
  streamConsumerName: 'MyStreamConsumer',
  stream,
});

// give lambda permissions to read stream via the stream consumer
streamConsumer.grantRead(lambdaRole);

Properties ​

streamIStreamstreamIStreamstreamIStreamStreamIStreamStreamIStreamrequired#
The Kinesis data stream to associate this consumer with.
streamConsumerNamestringstream_consumer_namestrstreamConsumerNameStringStreamConsumerNamestringStreamConsumerName*stringrequired#
The name of the stream consumer.