aws / aws/aws-cdk

aws_kinesis: Stream default removal policy changed in v2.140.0

Open
#30,562 5 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-kinesis bug p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
71

Description

### Describe the bug

#30037 added a new `removal_policy` parameter the the `aws_kinesis.Stream` constructor.

This was a breaking change. Previously it defaulted to `DESTROY` but now it defaults to `RETAIN`. This causes all of our stacks to leak their Kinesis streams upon deletion.

This change was not mentioned in the release notes.

### Expected Behavior

1. The default value of `removal_policy` should have remained `DESTROY`.
2. This change should have been mentioned in the release notes for v2.140.0.

### Current Behavior

It defaults to `RETAIN` causing all Kinesis streams to leak.

### Reproduction Steps

1. Create a stack with a Kinesis stream under v2.137.0. Then delete it. Observe the Kinesis stream is deleted.
2. Deploy the exact same stack under v2.143.0 without changing the cdk code. Then delete it. Observe the Kinesis stream is retained.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.143.0 (build 9f2bdf7)

### Framework Version

_No response_

### Node.js Version

v22.2.0

### OS

Alpine 3.20

### Language

Python

### Language Version

Python 3.12.3

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the aws_kinesis.Stream constructor and the change from issue #30037, then compare behavior between versions 2.137.0 and 2.143.0. Inspect the v2.140.0 release notes and existing Kinesis tests, if present. Done means the default deletion behavior matches the expected compatibility and the release notes accurately record the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, stream-processing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.