Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-msk-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ For more information, see [Amazon MSK Express Brokers](https://docs.aws.amazon.c

**Note:** When using Express Brokers, the following constraints apply:

- Apache Kafka version must be 3.6.x or 3.8.x
- Apache Kafka version must be 3.6.x, 3.8.x, or 3.9.x
- You must specify the `instanceType`
- The VPC must have at least 3 subnets (across 3 AZs)
- `ebsStorageInfo` is not supported
Expand Down
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,12 @@ export class Cluster extends ClusterBase {

if (isExpress) {
// Validate Kafka version compatibility
const supportedVersions = ['3.6', '3.8'];
// express broker documentation for supported versions https://docs.aws.amazon.com/msk/latest/developerguide/msk-broker-types-express.html#msk-broker-types-express-notes
const supportedVersions = ['3.6', '3.8', '3.9'];
const kafkaVersionString = props.kafkaVersion.version;
const isCompatibleVersion = supportedVersions.some(version => kafkaVersionString.includes(version));
if (!isCompatibleVersion) {
throw new core.ValidationError(`Express brokers are only supported with Apache Kafka 3.6.x and 3.8.x, got ${kafkaVersionString}`, this);
throw new core.ValidationError(`Express brokers are only supported with Apache Kafka ${supportedVersions.join(', ')}, got ${kafkaVersionString}`, this);
}

if (!props.instanceType) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ describe('MSK Cluster', () => {
),
brokerType: msk.BrokerType.EXPRESS,
});
}).toThrow('Express brokers are only supported with Apache Kafka 3.6.x and 3.8.x, got 2.6.1');
}).toThrow('Express brokers are only supported with Apache Kafka 3.6, 3.8, 3.9, got 2.6.1');
});
});
});
Loading