Volume 10 · Chapter 10 — Messaging and Event-Driven Architecture

Kinesis, Firehose, and MSK in Depth

Goutham Mayaluri 4 min read AWSCloudKinesisMessaging

10.1 Introduction

The streaming chapter covered Kinesis Data Streams; the exam expects the whole Kinesis family and its distinctions - Data Streams vs Firehose vs Managed Service for Apache Flink - plus MSK (managed Kafka), because choosing the right streaming service for a scenario is a common question.

10.2 Kinesis Data Streams Deep Dive

Kinesis Data Streamsingests real-time streaming data intoshards, each an ordered sequence providing fixed throughput (1 MB/s or 1,000 records/s in, 2 MB/s out). Records are placed on a shard by apartition key(same key → same shard → ordered), so key choice governs ordering and distribution (avoid hot shards). Data is retained (default 24 hours, up to 365 days) so consumers can replay. Consumers use the KCL, andenhanced fan-outgives each consumer its own dedicated 2 MB/s per shard (low-latency, many consumers) versus shared throughput. Capacity isprovisioned(manage shards) oron-demand(auto-scales). The exam pattern: Data Streams for custom real-time processing with multiple consumers, ordering, and replay; scale via shards; enhanced fan-out for many low-latency consumers.

flowchart TD
  Q{Streaming need?} -->|Custom real-time processing, multi-consumer, replay| KDS[Kinesis Data Streams - shards]
  Q -->|Load streaming data to a store, no code| KDF[Firehose -> S3/Redshift/OpenSearch/Splunk]
  Q -->|Real-time analytics/transform on a stream| Flink[Managed Service for Apache Flink]
  Q -->|Existing Kafka apps / ecosystem| MSK[Amazon MSK - managed Kafka]

10.3 Firehose vs Data Streams

Kinesis Data Firehoseis afully-managed deliveryservice - it loads streaming data directly into destinations (S3, Redshift, OpenSearch, Splunk, and HTTP endpoints) with optional buffering, compression, format conversion, and Lambda-based transformation,near-real-time(buffered, not sub-second), withno consumers to manage and no shards. The distinction the exam tests: useData Streamswhen you need custom, real-time processing, multiple independent consumers, ordering, and replay (you write consumers, manage shards); useFirehosewhen you simply want todeliverstreaming data into a store or analytics destination with minimal effort and can tolerate a short buffering delay (no code, no shards, auto-scaling). “Load streaming data to S3/Redshift with no management” → Firehose.

Amazon Managed Service for Apache Flink(formerly Kinesis Data Analytics) runs real-time stream processing and analytics - aggregations, transformations, windowed computations, and anomaly detection over a stream using SQL or Apache Flink - without managing infrastructure.**Amazon MSK (Managed Streaming for Apache Kafka)**is managed Apache Kafka - use it when you need the Kafka ecosystem, protocol compatibility, or are migrating existing Kafka workloads, rather than the AWS-native Kinesis. The exam mapping: Managed Flink for real-time analytics/processing on a stream; MSK for Kafka-compatible streaming (existing Kafka apps/ecosystem); Kinesis Data Streams for AWS-native custom streaming; Firehose for managed delivery to a store.

10.5 Banking Production Scenario

A bank ingests its transaction feed into Kinesis Data Streams (partitioned by account for ordering, on-demand capacity), where multiple consumers with enhanced fan-out run real-time fraud scoring and feed analytics, with retention enabling replay when models improve. A Firehose delivery stream loads the same events into S3 (and Redshift) for the data lake and warehouse with no consumer code. Amazon Managed Service for Apache Flink runs real-time windowed aggregations for live risk metrics. A legacy analytics platform built on Kafka is migrated to Amazon MSK for compatibility. This deliberate use of the streaming family - Data Streams for processing, Firehose for delivery, Flink for analytics, MSK for Kafka compatibility - is exactly the professional-level design the certification targets.

10.6 Chapter Revision Notes

  • Kinesis Data Streams: shards (ordered, fixed throughput), partition key sets ordering/distribution, retention for replay, enhanced fan-out for many low-latency consumers; provisioned or on-demand.
  • Firehose: fully-managed delivery to S3/Redshift/OpenSearch/Splunk with buffering/transform, near-real-time, no shards/consumers - for loading streaming data with minimal effort.
  • Data Streams (custom processing, multi-consumer, replay) vs Firehose (managed delivery to a store); “load to S3/Redshift no-code” → Firehose.
  • Managed Service for Apache Flink = real-time stream analytics/processing (SQL/Flink); MSK = managed Kafka for Kafka ecosystem/migration.
  • Match: Data Streams (AWS-native custom), Firehose (delivery), Flink (analytics), MSK (Kafka).