Amazon MSK - Overview
Amazon MSK (Managed Streaming for Apache Kafka) is AWS's fully managed solution for open-source Apache Kafka, giving you real-time event streaming pipelines without the massive headache of manually patching, scaling, and maintaining Kafka brokers!
While both Amazon Kinesis Data Streams and Amazon MSK solve the real-time streaming puzzle, the DVA-C02 exam heavily tests architectural trade-offs, configuration limits, and ingestion/consumption patterns between the two services.
Key Takeawaysโ
Let's go over the MSK architecture, scaling mechanics, consumption integration points, and the Kinesis vs. MSK comparison matrix.
๐๏ธ Core Architecture & Deployment Optionsโ
Amazon MSK deploys Kafka brokers across up to 3 Availability Zones (AZs) inside your private VPC for high availability:
- MSK Provisioned: You choose the EC2 broker instance types (e.g.,
kafka.m5.large) and allocate EBS storage volumes per broker. Data is stored persistently on EBS for as long as you configured. - MSK Serverless: Automatically provisions capacity, scales brokers, and manages storage on demand based on application throughputโzero server management required!
- Metadata Consensus Note (KRaft vs. ZooKeeper) ๐ง : Upstream Apache Kafka 4.0 removes ZooKeeper entirely in favor of KRaft (Kafka Raft) consensus. Modern MSK clusters run KRaft controllers managed transparently by AWS behind the scenes at no extra cost!
โ๏ธ Amazon Kinesis Data Streams vs. Amazon MSK (The Exam Showdown)โ
When DVA-C02 questions present real-time streaming requirements, use this side-by-side comparison matrix to immediately pick the right target:
| Architectural Metric | ๐ Amazon Kinesis Data Streams | ๐ธ Amazon MSK (Apache Kafka) |
|---|---|---|
| Message Payload Size | Strict 1 MB limit | Default 1 MB, configurable up to 10 MB+ |
| Partitioning Concept | Shards | Topics with Partitions |
| Scaling Mechanism | Shard Splitting (scale up) & Merging (scale down) | Add Partitions (cannot remove partitions!) |
| Retention Period | 24 hours up to 365 days max | Unlimited (constrained only by EBS storage budget) |
| Protocol Compatibility | AWS SDK / KPL / KCL APIs | Standard Apache Kafka APIs (Zero vendor lock-in) |
| Security | TLS in-flight & KMS at-rest encryption | PLAINTEXT or TLS in-flight and KMS at-rest encryption |
๐ Producing & Consuming from MSKโ
๐ฅ PRODUCERS ๐ธ MSK CLUSTER ๐ค CONSUMERS
(Kinesis, IoT, App Code) โโโบ [ Topic / Partitions ] โโโบ โก AWS Lambda (Event Source)
๐ Managed Flink (Kinesis Analytics)
๐งน AWS Glue Streaming ETL
๐ป Custom App (EC2 / ECS / EKS)

A. Producing Data:โ
Standard Kafka Producers, Debezium Change Data Capture (CDC) connectors, or custom applications write to MSK topics using standard Kafka client libraries.
B. Consuming Data (Key Exam Targets):โ
- AWS Lambda: Configured directly as an Event Source Mapping (
MSKtrigger). Lambda automatically manages polling batches and scaling workers. - Amazon Managed Service for Apache Flink (formerly Kinesis Data Analytics): Stateful real-time stream processing applications running native Flink SQL or Java/Scala code.
- AWS Glue: Real-time Streaming ETL jobs powered by Apache Spark Streaming.
- Custom Kafka Consumers: Self-managed application containers deployed on Amazon EC2, ECS, or EKS using native Kafka client SDKs.

Exam Tipsโ
- The >1 MB Message Size Requirement ๐จ: If a scenario states an application streams messages larger than 1 MB (e.g., 5 MB payloads) that exceed Kinesis limitsโchoose Amazon MSK with custom message size configuration.
- Existing Kafka Application Migration ๐: If an enterprise wants to migrate an existing open-source Apache Kafka workload to AWS without rewriting application producer/consumer code or changing APIsโselect Amazon MSK!
- Partition Scaling Direction: Remember that while Kinesis shards can be split and merged, Kafka topic partitions can only be addedโyou cannot decrease the partition count on a topic without recreating it!