Skip to content
v2.274.0

StreamProps Struct ​

Properties for a Kinesis Stream.

Example ​

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

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

Properties ​

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

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

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

encryptionKeyIKeyencryption_keyIKeyencryptionKeyIKeyEncryptionKeyIKeyEncryptionKeyIKey#
External KMS key to use for stream encryption.

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.

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

removalPolicyRemovalPolicyremoval_policyRemovalPolicyremovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicy= RemovalPolicy.RETAIN#
Policy to apply when the stream is removed from the stack.
retentionPeriodDurationretention_periodDurationretentionPeriodDurationRetentionPeriodDurationRetentionPeriodDuration= Duration.hours(24)#
The number of hours for the data records that are stored in shards to remain accessible.
shardCountnumbershard_countint | floatshardCountNumberShardCountdoubleShardCount*float64= 1#
The number of shards for the stream.

Can only be provided if streamMode is Provisioned.

shardLevelMetricsShardLevelMetrics[]shard_level_metricstyping.List[ShardLevelMetrics]shardLevelMetricsList<ShardLevelMetrics>ShardLevelMetricsShardLevelMetrics[]ShardLevelMetrics*[]ShardLevelMetrics#
A list of shard-level metrics in properties to enable enhanced monitoring mode.

Default: undefined - AWS Kinesis default is disabled

streamModeStreamModestream_modeStreamModestreamModeStreamModeStreamModeStreamModeStreamModeStreamMode= StreamMode.PROVISIONED#
The capacity mode of this stream.
streamNamestringstream_namestrstreamNameStringStreamNamestringStreamName*string= <generated>#
Enforces a particular physical stream name.