Streaming Windowed Aggregation with Kinesis Analytics
A data engineering team needs to process streaming data from thousands of IoT devices. They want to aggregate data in 1-minute windows and store results in an S3 data lake for downstream analytics. Which architecture should they use?
Quick Answer
Aggregating streaming data into fixed time windows, like the 1-minute windows described here, is a native capability of Kinesis Data Analytics for SQL Applications, which lets you write standard SQL over a continuously flowing stream and apply constructs like tumbling windows to group records by time without writing custom stream-processing code. Because it consumes directly from the Kinesis stream, it can compute these 1-minute aggregations continuously as new IoT data arrives, rather than requiring a separate batch job to periodically scan and group historical data after the fact. Once the aggregated results are produced, sending them to Kinesis Data Firehose for delivery to S3 is the natural next step, since Firehose is purpose-built to reliably batch, buffer, and write streaming output into S3 with minimal configuration, rather than requiring the analytics application itself to manage S3 writes, retries, and file-size optimization. The pairing works because each service does one job well: Kinesis Data Analytics handles the real-time SQL-based windowing logic, and Firehose handles the durable, efficient delivery of whatever that logic produces. This SQL-based windowing approach is also notable for requiring no custom application code, which fits a scenario emphasizing straightforward aggregation over thousands of IoT devices rather than complex per-record processing. Whenever a scenario asks for time-windowed aggregation of streaming data landing in S3 for later analytics, expect the answer to combine Kinesis Data Analytics for the SQL-based windowing with Firehose for the S3 delivery, rather than a single service trying to do both.
⚠ Common exam trap
Watch out — candidates often assume Lambda is suitable for real-time windowed aggregation, overlooking its stateless nature and execution limits, while Kinesis Data Analytics is the native AWS service for this exact use case.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use Kinesis Data Analytics for SQL-based windowed aggregations and send results to Kinesis Data Firehose for delivery to S3.
Kinesis Data Analytics for SQL Applications is purpose-built for real-time windowed aggregations on streaming data, such as 1-minute tumbling windows. It can directly consume from Kinesis Data Streams, perform the aggregation using standard SQL, and output the results to Kinesis Data Firehose, which reliably delivers the aggregated data to an S3 data lake with built-in buffering and compression.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use AWS Glue ETL jobs running in streaming mode to read from Kinesis Data Streams, apply window aggregations, and write to S3.
Why it's wrong here
AWS Glue streaming ETL jobs operate on micro-batches, introducing latency typically measured in minutes, which is unsuitable for the low-latency 1-minute window aggregations required by thousands of IoT devices. While it processes continuous data streams, its design prioritises robust ETL operations over immediate, real-time analytics. This option would be appropriate for continuous data transformation and loading into a data lake where a latency tolerance of several minutes is acceptable, rather than instantaneous aggregation.
- ✗
Use Kinesis Data Streams with enhanced fan-out and multiple consumers to aggregate windows, then write to S3 via Firehose.
Why it's wrong here
Enhanced fan-out improves throughput but does not provide built-in windowing; consumers must implement aggregation logic.
- ✗
Use Kinesis Data Streams, trigger a Lambda function for 1-minute window aggregation using Python, and write results to S3.
Why it's wrong here
Lambda can process streams but has limits on concurrency and execution duration; managing window state is complex and error-prone.
- ✓
Use Kinesis Data Analytics for SQL-based windowed aggregations and send results to Kinesis Data Firehose for delivery to S3.
Why this is correct
Kinesis Data Analytics supports tumbling windows and continuous queries; Firehose is the natural sink for S3.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
3 more ways this is tested on MLS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A data engineering team needs to process streaming data from thousands of IoT devices. The data must be ingested with low latency and processed in near real-time to detect anomalies. Which AWS service should they use for ingestion?
easy- A.Amazon Kinesis Data Firehose
- B.Amazon Kinesis Data Analytics
- C.Amazon S3
- ✓ D.Amazon Kinesis Data Streams
Why D: Amazon Kinesis Data Streams is the correct choice because it is designed for real-time, low-latency ingestion of streaming data from thousands of sources, such as IoT devices. It provides a durable, scalable data stream that can be consumed by multiple applications in near real-time, making it ideal for anomaly detection use cases.
Variation 2. A data science team needs to process streaming data from thousands of IoT devices and perform real-time anomaly detection. The data must be persisted in Amazon S3 for batch processing later. Which combination of AWS services should be used to meet these requirements?
medium- ✓ A.Amazon Kinesis Data Streams for ingestion, Amazon Kinesis Data Analytics for anomaly detection, and Amazon Kinesis Data Firehose to deliver data to Amazon S3.
- B.Amazon Kinesis Data Streams for ingestion, AWS Glue for anomaly detection, and Amazon S3 for storage.
- C.AWS Lambda for both ingestion and anomaly detection, and Amazon S3 for storage.
- D.Amazon Simple Queue Service (SQS) for ingestion, AWS Lambda for anomaly detection, and Amazon S3 for storage.
Why A: Amazon Kinesis Data Streams provides durable, real-time ingestion for high-throughput IoT data. Kinesis Data Analytics can perform SQL-based anomaly detection on the stream, and Kinesis Data Firehose reliably delivers the processed or raw data to Amazon S3 for batch processing. This combination meets all requirements for streaming ingestion, real-time analytics, and persistent storage.
Variation 3. A data scientist needs to process a large volume of streaming data from IoT devices and store the results in Amazon S3 for further analysis. Which AWS service is most suitable for ingesting and processing this data in near real-time?
easy- A.Amazon Redshift
- B.AWS Glue
- ✓ C.Amazon Kinesis Data Analytics
- D.Amazon EMR
Why C: Amazon Kinesis Data Analytics is the most suitable service because it can process streaming data from IoT devices in near real-time using SQL or Apache Flink, and directly output the results to Amazon S3. It is designed for continuous, low-latency ingestion and analysis of data streams, making it ideal for this use case.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.