aws-cdk-lib.aws_kinesis.StreamProps

interface StreamProps

LanguageType name
.NETAmazon.CDK.AWS.Kinesis.StreamProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awskinesis#StreamProps
Javasoftware.amazon.awscdk.services.kinesis.StreamProps
Pythonaws_cdk.aws_kinesis.StreamProps
TypeScript (source)aws-cdk-lib » aws_kinesis » StreamProps

Properties for a Kinesis Stream.

Example

const key = new kms.Key(this, 'MyKey');

new kinesis.Stream(this, 'MyEncryptedStream', {
  encryption: kinesis.StreamEncryption.KMS,
  encryptionKey: key,
});

Properties

NameTypeDescription
encryption?StreamEncryptionThe kind of server-side encryption to apply to this stream.
encryptionKey?IKeyExternal KMS key to use for stream encryption.
retentionPeriod?DurationThe number of hours for the data records that are stored in shards to remain accessible.
shardCount?numberThe number of shards for the stream.
streamMode?StreamModeThe capacity mode of this stream.
streamName?stringEnforces a particular physical stream name.

encryption?

Type: StreamEncryption (optional, default: StreamEncryption.KMS if encrypted Streams are supported in the region or StreamEncryption.UNENCRYPTED otherwise. StreamEncryption.KMS if an encryption key is supplied through the encryptionKey property)

The kind of server-side encryption to apply to this stream.

If you choose KMS, you can specify a KMS key via encryptionKey. If encryption key is not specified, a key will automatically be created.


encryptionKey?

Type: IKey (optional, default: Kinesis Data Streams master key ('/alias/aws/kinesis'). If encryption is set to StreamEncryption.KMS and this property is undefined, a new KMS key will be created and associated with this stream.)

External KMS key to use for stream encryption.

The 'encryption' property must be set to "Kms".


retentionPeriod?

Type: Duration (optional, default: Duration.hours(24))

The number of hours for the data records that are stored in shards to remain accessible.


shardCount?

Type: number (optional, default: 1)

The number of shards for the stream.

Can only be provided if streamMode is Provisioned.


streamMode?

Type: StreamMode (optional, default: StreamMode.PROVISIONED)

The capacity mode of this stream.


streamName?

Type: string (optional, default: )

Enforces a particular physical stream name.