interface StreamConsumerProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Kinesis.StreamConsumerProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awskinesis#StreamConsumerProps |
Java | software.amazon.awscdk.services.kinesis.StreamConsumerProps |
Python | aws_cdk.aws_kinesis.StreamConsumerProps |
TypeScript (source) | aws-cdk-lib » aws_kinesis » StreamConsumerProps |
Properties for a Kinesis Stream Consumer.
Example
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
| Name | Type | Description |
|---|---|---|
| stream | IStream | The Kinesis data stream to associate this consumer with. |
| stream | string | The name of the stream consumer. |
stream
Type:
IStream
The Kinesis data stream to associate this consumer with.
streamConsumerName
Type:
string
The name of the stream consumer.

.NET
Go
Java
Python
TypeScript (