Hello! Welcome back to the Exam Preparation and Scenario Analysis module.
In our last lesson, we established a critical mental model for evaluating cloud architectures: the AWS Well-Architected Framework. We broke down its six pillars and saw how they apply to data engineering, from cost optimization to operational excellence.
Today, we'll put that framework into practice. We're tackling one of the most common scenario types you'll face on the Data Engineer exam, addressing the learning outcome: Select the appropriate ingestion service (e.g., Kinesis, MSK, DMS) based on data velocity, volume, and variety.
Your ability to analyze trade-offs between these services is paramount. We will use the Well-Architected pillars as our guide to dissect the requirements of a given scenario and justify the selection of one service over another.
The Landscape of Data Ingestion
Data ingestion is the first step in any data pipeline—the process of moving data from its source into a system where it can be stored, processed, and analyzed. In the AWS ecosystem, this often means landing data in Amazon S3.

The choice of ingestion service depends heavily on the characteristics of the source data, often summarized by the "3 Vs":
- Velocity: How fast is the data generated and needs to be processed? (e.g., real-time, near real-time, batch)
- Volume: How much data is being moved? (e.g., kilobytes per second, terabytes per day)
- Variety: What is the nature of the data? (e.g., logs, clickstreams, database records, files)
Let's categorize the ingestion services based on these characteristics and evaluate them using the Well-Architected Framework.
1. Streaming Data Ingestion: High Velocity
When data arrives as a continuous, high-velocity stream—like clickstream data, IoT sensor readings, or application logs—you need a service designed for real-time or near real-time ingestion. The two primary contenders here are Amazon Kinesis and Amazon Managed Streaming for Apache Kafka (MSK).
The Amazon Kinesis Family
Amazon Kinesis is a suite of services for working with streaming data. To start, let's get a clear overview of the main components.
Amazon Kinesis Introduction and Overview (with SNS, SQS, Eventbridge Comparisons!)
This video from 'Be A Better Dev' provides an excellent overview of the Kinesis family and, crucially, compares it to other AWS messaging services like SQS and SNS, a common point of confusion. Pay close attention to the distinct roles of Data Streams and Data Firehose.
Please watch the following three segments: Kinesis Data Streams (03:44 - 14:47): Focus on the concepts of multiple consumers, data durability, and replayability. Kinesis Data Firehose (14:47 - 22:36): Understand its role in simple, near real-time delivery with batching and transformations. Comparison with SQS/SNS/EventBridge (26:42 - 30:56): This will solidify why Kinesis is the right choice for high-volume data ingestion scenarios, unlike event-driven application integration.
Let's solidify the key points from the video:
- Amazon Kinesis Data Streams: This is the core real-time ingestion service.
- Use Case: Ingesting high-volume, real-time data that needs to be processed by multiple applications with low latency (e.g., real-time analytics, anomaly detection).
- Key Features: Data is stored durably for up to 365 days, allowing multiple consumer applications to read the stream independently and replay data. Throughput is controlled by provisioning shards.
- Well-Architected Lens:
- Reliability: High. Data is replicated across multiple AZs. The ability to replay data is a huge win for recovering from consumer application failures.
- Performance: Very low latency (as low as 70ms). Throughput scales horizontally by adding more shards.

- Amazon Kinesis Data Firehose: This is the simplest way to load streaming data into destinations.
- Use Case: Ingesting streaming data and delivering it to a destination like S3, Redshift, or OpenSearch in near real-time.
- Key Features: Fully managed. It automatically batches, compresses, and encrypts data before delivery. It can perform light transformations via Lambda. You don't manage shards; it scales automatically.
- Well-Architected Lens:
- Operational Excellence: Very high. It's a serverless, "set and forget" service with minimal management overhead.
- Cost Optimization: Very effective for simple ingestion-to-storage patterns, as you pay for data volume ingested, not idle provisioned capacity.
Amazon MSK (Managed Streaming for Apache Kafka)
MSK is AWS's managed offering for Apache Kafka, a popular open-source streaming platform.
- Use Case: For organizations already using Kafka, wanting to migrate to the cloud without re-architecting applications. Also chosen when specific Kafka-native features or third-party tools from the Kafka ecosystem are required.
- Well-Architected Lens:
- Operational Excellence: Lower than Kinesis. While AWS manages the underlying servers (broker patching, replacement), you are still responsible for capacity planning, provisioning broker instances and storage, and configuring topics and partitions.
- Cost Optimization: Can be more cost-effective than Kinesis at very high, sustained throughputs, but has a much higher baseline cost due to the provisioned broker instances.
Kinesis vs. MSK: The Head-to-Head Comparison
This is a classic exam scenario. Choosing between them requires a clear understanding of the trade-offs.
The 'cloudonaut' channel provides a fantastic, concise comparison between Kinesis Data Streams and MSK. It focuses on the most important differences for an engineer: technical capabilities, operational overhead, and, most importantly, cost.
Please watch these two key sections: Most Important Differences (02:19 - 06:42): This covers delivery guarantees, data processing options, persistence, and operational overhead. Costs (06:42 - 14:06): This is a critical section that walks through a concrete example of how pricing differs, highlighting the scenarios where one is more cost-effective than the other.
Summary of Kinesis vs. MSK:
| Feature | Amazon Kinesis Data Streams | Amazon MSK |
|---|---|---|
| Management Model | Serverless-like (you manage shards, not servers) | Managed (you manage brokers, storage, and partitions) |
| Operational Effort | Low | Medium |
| Cost Model | Pay-per-shard-hour + data payload | Pay-per-broker-hour + storage |
| Best for... | New applications, unpredictable workloads, deep AWS integration | Existing Kafka workloads, open-source alignment, very high volume |
| Use when you need... | Simplicity, low operational overhead, cost-efficiency at small-to-medium scale. | The Kafka ecosystem, fine-grained control, potential cost savings at massive scale. |
2. Database Ingestion: Change Data Capture (CDC)
When your data source is a transactional database (like RDS, Aurora, or an on-prem database), you often need to ingest not just a one-time snapshot but a continuous stream of changes. For this, the purpose-built tool is AWS Database Migration Service (DMS).
Data Engineering on AWS: The AWS Data Services
The article 'Data Engineering on AWS' provides a clear, practical explanation of AWS DMS and its role in Change Data Capture (CDC).
Please read the section titled '1) Amazon Database Migration Service (DMS)'. Focus on understanding how DMS uses transaction logs for CDC and what the output looks like (the I, U, D records).
- Use Case: Migrating databases to AWS or, more relevant for data engineering, performing continuous replication of a source database into an S3 data lake.
- Key Features: DMS performs a one-time full load and then transitions to capturing ongoing changes (Inserts, Updates, Deletes) from the database's transaction logs. This is known as Change Data Capture (CDC).
- Well-Architected Lens:
- Reliability: DMS is a managed, resilient service designed for this task. It's far more reliable than writing and maintaining custom scripts to poll a database for changes.
- Performance Efficiency: By reading from the transaction logs, it's more efficient than repeatedly querying the database tables, which would put a heavy load on the source system.
3. Batch & File-Based Ingestion
Not all data is a real-time stream. Often, you need to ingest large batches of files from on-premises file shares, partner SFTP servers, or even physically ship petabytes of data.
- AWS Transfer Family: Provides a fully managed service for file transfers into S3 using protocols like SFTP, FTP, and FTPS.
- Use Case: When you need to receive data from external partners or legacy systems that use standard file transfer protocols.
- AWS DataSync: An agent-based service for accelerating online data transfers between on-premises storage (like NFS and SMB file shares) and AWS storage services (like S3).
- Use Case: One-time migration or ongoing replication of large file systems from a data center to AWS. It's much faster and more reliable than scripting transfers over the internet.
- AWS Snow Family (Snowball, Snowcone): Physical devices that you use to transfer petabyte-scale data when network transfer is not feasible.
- Use Case: Migrating massive historical archives or collecting data from environments with limited or no network connectivity.
For each of these, the "When to use" sections in the "Data Engineering on AWS" article (LINK) provide excellent summaries.
Test your understanding!
You are a data engineer at an e-commerce company. A new requirement comes in to analyze user activity on the website in real-time to detect fraudulent behavior. The data consists of millions of click events per minute. The analytics team needs to consume these events immediately, and a separate machine learning team wants to consume the same stream to train models.
Which ingestion service would you choose and why, using the Well-Architected Framework to justify your answer?
Show answer
The best choice is Amazon Kinesis Data Streams.
Here's the justification based on the Well-Architected Framework:
- Performance Efficiency: The requirement is for "real-time" analysis with "millions of events per minute" (high velocity and volume). Kinesis Data Streams provides very low latency and can scale to handle this throughput by adding more shards.
- Reliability: The requirement for two separate teams (analytics and ML) to consume the data highlights the need for multiple consumers. Kinesis Data Streams is designed for this fan-out pattern, allowing each consumer to process the stream independently without interfering with the other. The data is also durably stored, so if a consumer fails, it can resume from where it left off or replay data.
- Cost Optimization: While MSK could also handle the performance, Kinesis is generally more cost-effective for new projects where the workload might fluctuate. You start with a few shards and scale up, avoiding the high upfront cost of provisioning an MSK broker cluster.
- Operational Excellence: Kinesis Data Streams has lower operational overhead than MSK. You manage shard capacity, not underlying broker instances, making it easier to operate.
Why not other services?
- Kinesis Data Firehose: It's for near real-time and doesn't support multiple independent consumers reading from the stream directly.
- DMS: The data is a stream of events (clickstream), not records from a transactional database.
- MSK: A valid technical option, but Kinesis is a better fit due to lower operational overhead and a more favorable cost model for starting a new project (as per the Cost Optimization pillar).
Conclusion
Choosing the right ingestion service is a foundational decision in data architecture. By analyzing the data's velocity, volume, and variety and applying the Well-Architected Framework, you can make a defensible choice that balances performance, cost, and reliability.
Key Takeaways:
- For real-time streams with multiple consumers and replay needs: Use Kinesis Data Streams.
- For simple, near real-time delivery to S3/Redshift: Use Kinesis Data Firehose.
- For migrating existing Kafka workloads or when you need the Kafka ecosystem: Use Amazon MSK.
- For continuous replication from databases: Use AWS DMS with CDC.
- For file-based transfers: Use AWS Transfer Family (for SFTP/FTP) or AWS DataSync (for on-prem file systems).
Next Up:
Once data is ingested into your data lake, the next step is to transform it. In our next lesson, we will apply the same scenario-based analysis to answer the question: Select the appropriate transformation service (e.g., Glue, EMR, Lambda) based on data scale, complexity, and latency.