aws-kinesis: support maximum record size on Stream
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
`MaxRecordSizeInKiB` is supported by the underlying L1 `AWS::Kinesis::Stream` but missing from the L2 `StreamProps` in `aws-cdk-lib/aws-kinesis`.
Kinesis Data Streams [raised the maximum size of a single record from 1 MiB to 10 MiB](https://aws.amazon.com/about-aws/whats-new/2025/10/amazon-kinesis-data-streams-10x-larger-record-sizes/) in October 2025.
### Use Case
Workloads that intermittently emit payloads larger than 1 MiB (IoT telemetry batches, CDC records, generative AI payloads) no longer need to split records across a side channel. Configuring this from CDK currently requires an escape hatch:
```ts
const stream = new kinesis.Stream(this, 'MyStream');
(stream.node.defaultChild as kinesis.CfnStream).maxRecordSizeInKiB = 10240;
```
### Proposed Solution
Add optional `maxRecordSize?: Size` to `StreamProps` and pass it through to the L1 `MaxRecordSizeInKiB`.
```ts
new kinesis.Stream(this, 'MyLargeRecordStream', {
maxRecordSize: Size.mebibytes(10),
});
```
`Size` rather than a raw number, so the unit is carried by the type. Same as `ephemeralStorageSize` in `aws-lambda` and `provisionedThroughputPerSecond` in `aws-efs`.
### Other Information
`WarmThroughputMiBps` is also missing from this L2. Different constraints, so I will raise it separately.
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.267.0
### AWS CDK CLI version
2.1131.0 (build 1e9a1e1)
### Node.js Version
v20.19.2
### OS
macOS 14.6.1
### Language
TypeScript
Contributor guide
Research direction
Start at the aws-kinesis L2 Stream and its StreamProps, then inspect how existing Size-based properties are passed to the underlying AWS::Kinesis::Stream. Add the optional maxRecord property and verify that it produces MaxRecordSizeInKiB; done means the documented Size.mebibytes(10) usage works without the escape hatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100