AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Kinesis::Stream

CfnStream

Creates a Kinesis stream that captures and transports data records that are emitted from data sources. For information about creating streams, see [CreateStream](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_CreateStream.html) in the Amazon Kinesis API Reference.

Import

import { CfnStream } from 'aws-cdk-lib/aws-kinesis';

Or use the module namespace:

import * as kinesis from 'aws-cdk-lib/aws-kinesis';
// kinesis.CfnStream

Properties

Configuration passed to the constructor as CfnStreamProps.

desiredShardLevelMetricsOptional
string[]

A list of shard-level metrics in properties to enable enhanced monitoring mode.

maxRecordSizeInKiBOptional
number

The maximum record size of a single record in kibibyte (KiB) that you can write to, and read from a stream.

nameOptional
string

The name of the Kinesis stream. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the stream name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) . If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

retentionPeriodHoursOptional
number

The number of hours for the data records that are stored in shards to remain accessible. The default value is 24. For more information about the stream retention period, see [Changing the Data Retention Period](https://docs.aws.amazon.com/streams/latest/dev/kinesis-extended-retention.html) in the Amazon Kinesis Developer Guide.

shardCountOptional
number

The number of shards that the stream uses. For greater provisioned throughput, increase the number of shards.

streamEncryptionOptional
IResolvable | StreamEncryptionProperty

When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.

streamModeDetailsOptional
IResolvable | StreamModeDetailsProperty

Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an *on-demand* capacity mode and a *provisioned* capacity mode for your data streams.

tagsOptional
CfnTag[]

An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream. For information about constraints for this property, see [Tag Restrictions](https://docs.aws.amazon.com/streams/latest/dev/tagging.html#tagging-restrictions) in the *Amazon Kinesis Developer Guide* .

warmThroughputMiBpsOptional
number

The target warm throughput in MB/s that the stream should be scaled to handle. This represents the throughput capacity that will be immediately available for write operations.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter