Big data ingestion pipeline
A fully serverless big data pipeline on AWS, from IoT devices through Kinesis, Firehose, S3, Lambda and Athena to QuickSight and Redshift, and why each piece is there.
The requirements
A company wants a pipeline that:
- is fully serverless;
- collects data in real time;
- transforms the data;
- lets them query the transformed data using SQL;
- stores the reports created by the queries in S3;
- loads that data into a warehouse and creates dashboards.
The architecture
- IoT Core harvests data from IoT devices.
- Kinesis Data Streams collects it in real time.
- Data Firehose delivers it to S3 in near real time (about every minute), with Lambda helping Firehose transform the data.
- The ingestion bucket stores the raw data.
- S3 can send event notifications to SQS (optional; S3 could also invoke Lambda directly).
- Lambda subscribes to SQS and runs an Athena query.
- Athena is serverless SQL; it pulls data from the ingestion bucket and stores the results in S3.
- The reporting bucket contains the analysed data, used by reporting tools such as QuickSight and by Redshift (here Redshift Serverless, to stay serverless).
Why each piece
- Kinesis Data Streams rather than SQS: ordered, replayable, real-time streams with several consumers.
- Firehose rather than custom code: managed delivery and batching into S3, with optional Lambda transformation.
- SQS between S3 and Lambda: a buffer that absorbs bursts and retries failed work.
- Athena rather than a cluster: SQL on S3 with nothing to run between queries.
- Redshift Serverless rather than a provisioned cluster: no capacity to manage, pay when queried.
Exam tips
- "Serverless pipeline: collect in real time, transform, query with SQL, dashboards" → Kinesis Data Streams → Firehose (+ Lambda) → S3 → Athena → QuickSight.
- "Near real-time delivery to S3" → Firehose. "Real-time ingestion" → Kinesis Data Streams.
- "Transform records in flight with Firehose" → a Lambda transformation.
Common traps
- "Firehose is real time." It buffers: near real time.
- "Use EMR for a fully serverless pipeline." Classic EMR runs clusters; Athena, Glue or EMR Serverless fit "serverless".
Check yourself
Building the whole pipeline needs Kinesis shards and several services running, so instead:
IoT Core → Kinesis Data Streams → Firehose (Lambda transform) → S3; a scheduled or event-driven Lambda runs Athena queries that write reports to S3; QuickSight builds the dashboard on Athena or the reports.
AWS documentation
Managed Flink and Amazon MSK
Amazon Managed Service for Apache Flink for real-time stream processing, Amazon MSK for managed Apache Kafka, how Kafka works, Kinesis Data Streams vs MSK, and MSK consumers.
Data Exchange, Data Pipeline and Kinesis Video Streams
AWS Data Exchange for third-party data, AWS Data Pipeline and its maintenance mode, and Amazon Kinesis Video Streams for streaming and storing video from devices.