Skip to content

Commit 29623d1

Browse files
authored
feat(msk): support for Kafka version 3.8.x and add deprecated labels to legacy versions (#33553)
### Issue # (if applicable) N/A ### Reason for this change * MSK now supports Kafka version 3.8 ([Ref](https://aws.amazon.com/about-aws/whats-new/2025/02/amazon-msk-apache-kafka-version-3-8/)) * Some versions are already deprecated ([Ref](https://docs.aws.amazon.com/msk/latest/developerguide/supported-kafka-versions.html) ### Description of changes * Add Kafka version 3.8.x. * Add deprecated labels to following versions: | version | EOL | |----------|-----| | 2.6.0 | 2024-09-11 | | 2.6.1 | 2024-09-11 | | 2.6.2 | 2024-09-11 | | 2.6.3 | 2024-09-11 | | 2.7.0 | 2024-09-11 | | 2.7.1 | 2024-09-11 | | 2.7.2 | 2024-09-11 | | 2.8.0 | 2024-09-11 | | 2.8.1 | 2024-09-11 | | 2.8.2-tiered | 2025-01-14 | | 3.1.1 | 2024-09-11 | | 3.2.0 | 2024-09-11 | | 3.3.1 | 2024-09-11 | | 3.3.2 | 2024-09-11 | ### Describe any new or updated permissions being added Nothing. ### Description of how you validated changes Update unit tests and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent ff658ba commit 29623d1

11 files changed

+1271
-140
lines changed

packages/@aws-cdk/aws-msk-alpha/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The following example creates an MSK Cluster.
2323
declare const vpc: ec2.Vpc;
2424
const cluster = new msk.Cluster(this, 'Cluster', {
2525
clusterName: 'myCluster',
26-
kafkaVersion: msk.KafkaVersion.V2_8_1,
26+
kafkaVersion: msk.KafkaVersion.V3_8_X,
2727
vpc,
2828
});
2929
```
@@ -36,7 +36,7 @@ To control who can access the Cluster, use the `.connections` attribute. For a l
3636
declare const vpc: ec2.Vpc;
3737
const cluster = new msk.Cluster(this, 'Cluster', {
3838
clusterName: 'myCluster',
39-
kafkaVersion: msk.KafkaVersion.V2_8_1,
39+
kafkaVersion: msk.KafkaVersion.V3_8_X,
4040
vpc,
4141
});
4242

@@ -88,7 +88,7 @@ import * as acmpca from 'aws-cdk-lib/aws-acmpca';
8888
declare const vpc: ec2.Vpc;
8989
const cluster = new msk.Cluster(this, 'Cluster', {
9090
clusterName: 'myCluster',
91-
kafkaVersion: msk.KafkaVersion.V2_8_1,
91+
kafkaVersion: msk.KafkaVersion.V3_8_X,
9292
vpc,
9393
encryptionInTransit: {
9494
clientBroker: msk.ClientBrokerEncryption.TLS,
@@ -113,7 +113,7 @@ Enable client authentication with [SASL/SCRAM](https://docs.aws.amazon.com/msk/l
113113
declare const vpc: ec2.Vpc;
114114
const cluster = new msk.Cluster(this, 'cluster', {
115115
clusterName: 'myCluster',
116-
kafkaVersion: msk.KafkaVersion.V2_8_1,
116+
kafkaVersion: msk.KafkaVersion.V3_8_X,
117117
vpc,
118118
encryptionInTransit: {
119119
clientBroker: msk.ClientBrokerEncryption.TLS,
@@ -132,7 +132,7 @@ Enable client authentication with [IAM](https://docs.aws.amazon.com/msk/latest/d
132132
declare const vpc: ec2.Vpc;
133133
const cluster = new msk.Cluster(this, 'cluster', {
134134
clusterName: 'myCluster',
135-
kafkaVersion: msk.KafkaVersion.V2_8_1,
135+
kafkaVersion: msk.KafkaVersion.V3_8_X,
136136
vpc,
137137
encryptionInTransit: {
138138
clientBroker: msk.ClientBrokerEncryption.TLS,
@@ -155,7 +155,7 @@ import * as acmpca from 'aws-cdk-lib/aws-acmpca';
155155
declare const vpc: ec2.Vpc;
156156
const cluster = new msk.Cluster(this, 'Cluster', {
157157
clusterName: 'myCluster',
158-
kafkaVersion: msk.KafkaVersion.V2_8_1,
158+
kafkaVersion: msk.KafkaVersion.V3_8_X,
159159
vpc,
160160
encryptionInTransit: {
161161
clientBroker: msk.ClientBrokerEncryption.TLS,
@@ -186,7 +186,7 @@ declare const vpc: ec2.Vpc;
186186
declare const bucket: s3.IBucket;
187187
const cluster = new msk.Cluster(this, 'cluster', {
188188
clusterName: 'myCluster',
189-
kafkaVersion: msk.KafkaVersion.V2_8_1,
189+
kafkaVersion: msk.KafkaVersion.V3_8_X,
190190
vpc,
191191
logging: {
192192
s3: {

packages/@aws-cdk/aws-msk-alpha/lib/cluster-version.ts

+41
Original file line numberDiff line numberDiff line change
@@ -72,71 +72,99 @@ export class KafkaVersion {
7272

7373
/**
7474
* Kafka version 2.6.0
75+
*
76+
* @deprecated use the latest runtime instead
7577
*/
7678
public static readonly V2_6_0 = KafkaVersion.of('2.6.0');
7779

7880
/**
7981
* Kafka version 2.6.1
82+
*
83+
* @deprecated use the latest runtime instead
8084
*/
8185
public static readonly V2_6_1 = KafkaVersion.of('2.6.1');
8286

8387
/**
8488
* Kafka version 2.6.2
89+
*
90+
* @deprecated use the latest runtime instead
8591
*/
8692
public static readonly V2_6_2 = KafkaVersion.of('2.6.2');
8793

8894
/**
8995
* Kafka version 2.6.3
96+
*
97+
* @deprecated use the latest runtime instead
9098
*/
9199
public static readonly V2_6_3 = KafkaVersion.of('2.6.3');
92100

93101
/**
94102
* Kafka version 2.7.0
103+
*
104+
* @deprecated use the latest runtime instead
95105
*/
96106
public static readonly V2_7_0 = KafkaVersion.of('2.7.0');
97107

98108
/**
99109
* Kafka version 2.7.1
110+
*
111+
* @deprecated use the latest runtime instead
100112
*/
101113
public static readonly V2_7_1 = KafkaVersion.of('2.7.1');
102114

103115
/**
104116
* Kafka version 2.7.2
117+
*
118+
* @deprecated use the latest runtime instead
105119
*/
106120
public static readonly V2_7_2 = KafkaVersion.of('2.7.2');
107121

108122
/**
109123
* Kafka version 2.8.0
124+
*
125+
* @deprecated use the latest runtime instead
110126
*/
111127
public static readonly V2_8_0 = KafkaVersion.of('2.8.0');
112128

113129
/**
114130
* Kafka version 2.8.1
131+
*
132+
* @deprecated use the latest runtime instead
115133
*/
116134
public static readonly V2_8_1 = KafkaVersion.of('2.8.1');
117135

118136
/**
119137
* AWS MSK Kafka version 2.8.2.tiered
138+
*
139+
* @deprecated use the latest runtime instead
120140
*/
121141
public static readonly V2_8_2_TIERED = KafkaVersion.of('2.8.2.tiered', { tieredStorage: true });
122142

123143
/**
124144
* Kafka version 3.1.1
145+
*
146+
* @deprecated use the latest runtime instead
125147
*/
126148
public static readonly V3_1_1 = KafkaVersion.of('3.1.1');
127149

128150
/**
129151
* Kafka version 3.2.0
152+
*
153+
* @deprecated use the latest runtime instead
130154
*/
131155
public static readonly V3_2_0 = KafkaVersion.of('3.2.0');
132156

133157
/**
134158
* Kafka version 3.3.1
159+
*
160+
* @deprecated use the latest runtime instead
135161
*/
136162
public static readonly V3_3_1 = KafkaVersion.of('3.3.1');
137163

138164
/**
139165
* Kafka version 3.3.2
166+
*
167+
* @deprecated use the latest runtime instead
140168
*/
141169
public static readonly V3_3_2 = KafkaVersion.of('3.3.2');
142170

@@ -169,6 +197,19 @@ export class KafkaVersion {
169197
*/
170198
public static readonly V3_7_X_KRAFT = KafkaVersion.of('3.7.x.kraft', { tieredStorage: true });
171199

200+
/**
201+
* Kafka version 3.8.x with ZooKeeper metadata mode support
202+
*
203+
* @see https://docs.aws.amazon.com/msk/latest/developerguide/metadata-management.html#msk-get-connection-string
204+
*/
205+
public static readonly V3_8_X = KafkaVersion.of('3.8.x', { tieredStorage: true });
206+
207+
/**
208+
* Kafka version 3.8.x with KRaft (Apache Kafka Raft) metadata mode support
209+
*
210+
* @see https://docs.aws.amazon.com/msk/latest/developerguide/metadata-management.html#kraft-intro
211+
*/
212+
public static readonly V3_8_X_KRAFT = KafkaVersion.of('3.8.x.kraft', { tieredStorage: true });
172213
/**
173214
* Custom cluster version
174215
* @param version custom version number

packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ describe('MSK Cluster', () => {
4747
[msk.KafkaVersion.V3_6_0, '3.6.0'],
4848
[msk.KafkaVersion.V3_7_X, '3.7.x'],
4949
[msk.KafkaVersion.V3_7_X_KRAFT, '3.7.x.kraft'],
50+
[msk.KafkaVersion.V3_8_X, '3.8.x'],
51+
[msk.KafkaVersion.V3_8_X_KRAFT, '3.8.x.kraft'],
5052
],
5153
)('created with expected Kafka version %j', (parameter, result) => {
5254
new msk.Cluster(stack, 'Cluster', {

packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-version.js.snapshot/KafkaVersionIntegTestDefaultTestDeployAssertD6628743.assets.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-version.js.snapshot/KafkaVersionTestStack.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)