Data Ingestion & Transformation: Kinesis, Glue, Athena, and Lake Formation
Task 3.5 covers how data gets into AWS and becomes queryable: streaming ingestion with Kinesis Data Streams vs Firehose (and MSK when Kafka matters), data transfer with DataSync, Storage Gateway, Transfer Family, and the Snow family, transformation and cataloging with AWS Glue ETL and crawlers, building an Athena data lake on S3 secured by AWS Lake Formation, and analysis with Athena, Redshift, EMR, and QuickSight. It sits in Design High-Performing Architectures, worth 24% of SAA-C03 scored content. The exam rarely asks how any of these services work internally — it hands you a requirement with a qualifier ("near-real-time," "LEAST operational overhead," "MOST cost-effective") and four service chains that all technically move data, only one of which fits. By the end of this lesson you will be able to route any ingest-transform-store-query scenario to the right chain and explain, service by service, why the alternatives lose.
On this page9 sections
- Kinesis Data Streams: real-time ingestion for custom consumers
- Amazon Data Firehose: managed delivery, near-real-time, zero administration
- Data transfer selection: DataSync, Storage Gateway, Transfer Family, Snow
- Building and securing the data lake: S3 plus Lake Formation
- AWS Glue: serverless ETL and the Data Catalog everything shares
- Querying the lake: Athena vs Redshift vs EMR, and QuickSight on top
- Format performance: Parquet, compression, and partitioning
- The end-to-end pattern: ingest, transform, store, query, visualize
- Worked scenarios: reasoning through Task 3.5 questions
- Choose between Kinesis Data Streams, Amazon Data Firehose, and Amazon MSK for any streaming ingestion requirement
- Select the right transfer service — DataSync, Storage Gateway, Transfer Family, or Snow family — from the scenario's frequency and connectivity clues
- Design a data lake on S3 with AWS Glue crawlers, the Data Catalog, and Lake Formation permissions
- Decide between Athena, Redshift, and EMR for a given query workload and justify the choice on overhead and cost
- Cut Athena cost and query time by converting CSV to Parquet and partitioning data
- Assemble an end-to-end streaming architecture from ingestion through transformation to visualization
Kinesis Data Streams: real-time ingestion for custom consumers
Amazon Kinesis Data Streams is the ingestion backbone when your application needs to process streaming records in real time with its own code. Producers put records onto the stream; one or more consumer applications — AWS Lambda functions, containers running the Kinesis Client Library, Amazon Managed Service for Apache Flink — read and act on them within moments of arrival. That word consumers is the decision hinge: Data Streams gives you a durable, ordered buffer, and you bring the compute that reads it.
Three properties define it on the exam. First, retention and replay: records persist for 24 hours by default, extendable up to 365 days, and consumers can rewind and re-read — multiple independent applications can process the same stream, each at its own pace. Second, ordering: a stream is divided into shards, and every record carries a partition key that determines its shard. Records sharing a partition key land in the same shard and are read in the exact order written — so "events for each device must be processed in order" resolves to Data Streams with the device ID as partition key. Third, capacity modes, needed at recognition level: provisioned mode makes you size the shard count yourself (each shard ingests up to 1 MB or 1,000 records per second), while on-demand mode scales capacity automatically and suits spiky or unpredictable traffic — the LEAST-overhead choice when throughput is unknown.
The cost of this power is that you own the consumer fleet: writing, deploying, scaling, and monitoring the code that reads the stream. When a scenario needs none of that — the data just has to land somewhere — Data Streams is over-engineering, which sets up the next section.
The exam tests Data Streams by requirement keywords: "real-time processing," "multiple applications consume the same data," "replay events," or "strict per-key ordering" all point here, and an option that swaps in Firehose fails the moment custom consumers or replay are required.
Amazon Data Firehose: managed delivery, near-real-time, zero administration
Amazon Data Firehose (long known as Kinesis Data Firehose) answers a different question: not "how do I process a stream" but "how do I get streaming data into a destination with no code and no infrastructure." Firehose is a fully managed delivery service — you point it at Amazon S3, Amazon Redshift, Amazon OpenSearch Service, or supported third-party and HTTP endpoints, and it handles batching, retries, scaling, and delivery entirely on its own. There are no shards to size, no consumers to write, nothing to administer.
Two behaviors matter for exam decisions. First, Firehose buffers: it accumulates records until a size or time threshold is reached, then delivers the batch. That makes it near-real-time, not real-time — data arrives in the destination seconds to minutes after ingestion, which is fine for loading a data lake and wrong for a fraud check that must react instantly. Second, Firehose transforms in flight: it can invoke an inline AWS Lambda function to clean, enrich, or reshape each batch, and it offers built-in format conversion that turns incoming JSON into Apache Parquet or ORC before writing to S3 — columnar output with zero ETL jobs, a detail the exam rewards repeatedly. Firehose does not retain data for replay and does not support custom consumers; it is a pipe, not a buffer.
Two related services round out the picture. Amazon MSK (Managed Streaming for Apache Kafka) exists for one exam signal: the scenario names Kafka — an existing Kafka application, Kafka APIs, or a Kafka ecosystem tool — and the answer is MSK rather than rewriting for Kinesis. And the two Kinesis services compose: the classic pattern is Data Streams → Firehose, where real-time consumers process the stream and Firehose reads the same stream to archive everything into S3 for analytics.
On the exam, "no consumer code," "deliver to S3/Redshift/OpenSearch," "near-real-time," and "least operational overhead" are the four fingerprints of Firehose; "real-time with custom processing" or "replay" pulls you back to Data Streams, and "Kafka" pulls you to MSK.
Data transfer selection: DataSync, Storage Gateway, Transfer Family, Snow
Not all ingestion is streaming — a large share of Task 3.5 questions move files into AWS, and each transfer service owns one requirement shape.
AWS DataSync is the online migration and scheduled-copy tool: an agent reads on-premises NFS, SMB, or HDFS storage (or another cloud's object store) and copies data over the network into S3, EFS, or FSx — one time for a migration, or on a schedule for recurring transfers. It handles encryption in transit, integrity verification, and bandwidth throttling, and it also copies between AWS storage services. The keyword is transfer: the data moves, and afterwards applications use it in AWS.
AWS Storage Gateway solves ongoing hybrid access, not transfer: on-premises applications keep reading and writing through a local gateway (File Gateway exposing NFS/SMB backed by S3, Volume Gateway for block storage, Tape Gateway for backup software) while the data lives in AWS. If the scenario says on-premises systems must continue accessing the data after it lands in S3, that continuing access is what separates Storage Gateway from DataSync.
AWS Transfer Family gives external partners what they already use: fully managed SFTP, FTPS, and FTP endpoints that deposit files directly into S3 (or EFS). When a scenario says partners "upload files over SFTP" and the company wants out of the server-management business, Transfer Family is the answer — no EC2-hosted FTP server, no patching.
The AWS Snow family is the offline path: physical devices for bulk transfer when the dataset is too large or the link too slow for network transfer to finish in acceptable time.
| Requirement phrase | Service |
|---|---|
| "Migrate file shares to S3/EFS/FSx" / "copy nightly on a schedule" | AWS DataSync |
| "On-premises apps must keep low-latency access to data stored in AWS" | AWS Storage Gateway |
| "Partners upload files via SFTP/FTPS" | AWS Transfer Family |
| "Petabytes over a slow or no network link" / "offline transfer" | AWS Snow family |
| "Continuous streaming records into S3" | Amazon Data Firehose |
The exam tests this as pure pattern-matching under a LEAST-overhead qualifier: each option is a real transfer mechanism, and the frequency and access clues in the scenario select exactly one.
Building and securing the data lake: S3 plus Lake Formation
A data lake on AWS is not a product — it is Amazon S3 holding raw and transformed data at any scale, plus a metadata catalog that makes the objects queryable as tables. S3 wins the storage role on every axis the exam cares about: effectively unlimited capacity, eleven-nines durability, lifecycle tiering for cost, and native integration with every analytics service. Data lands in the lake through the ingestion paths already covered — Firehose delivery, DataSync copies, Transfer Family uploads — typically organized into zones (raw, cleaned, curated) by prefix.
Securing the lake used to mean sprawl: bucket policies for S3, IAM policies per analytics service, and no single view of who can read which table. AWS Lake Formation exists to collapse that sprawl. It layers a centralized permissions model over the S3 data and the Glue Data Catalog: you grant users and roles access at the database, table, and column level in one place, and those grants are enforced consistently across Athena, Redshift Spectrum, Glue, and EMR. Instead of maintaining parallel bucket policies and per-service IAM statements, one Lake Formation grant answers "can this analyst see this column." Lake Formation also helps stand the lake up — registering S3 locations, crawling and cataloging data — but its exam identity is governance: fine-grained, centralized data-lake permissions.
The ingestion points themselves need securing too, and the controls are the standard ones applied deliberately: IAM policies scope which producers can write to a stream or bucket, interface VPC endpoints keep Kinesis and Firehose traffic off the public internet, server-side encryption with KMS protects streams and S3 data at rest, TLS protects data in transit, and Transfer Family authenticates partners with service-managed or directory-based credentials rather than shared server logins.
On the exam, "centrally manage fine-grained access to a data lake" or "grant column-level permissions across Athena and Redshift Spectrum" is Lake Formation by definition — options that hand-assemble the same result from bucket policies and per-service IAM are the operational-overhead distractors.
Querying the lake: Athena vs Redshift vs EMR, and QuickSight on top
Once data is cataloged, three services compete to query it, and SAA-C03 separates them by workload shape rather than feature lists.
Amazon Athena is serverless, interactive SQL directly against S3, using the Glue Data Catalog for schemas. There is no cluster and no data loading — you pay per data scanned by each query. That makes Athena the answer for ad hoc, occasional, or unpredictable querying of data that lives in S3: log investigations, one-off analyses, dashboards refreshed a few times a day. Its economics also create its one design obligation — because you pay by bytes scanned, format and partitioning matter enormously, which the next section covers.
Amazon Redshift is a data warehouse: data is loaded into Redshift's own managed, columnar storage, where repeated, complex BI workloads — dashboards hit constantly, heavy joins and aggregations across billions of rows, concurrent analyst teams — run with consistently high performance. The trade is overhead and commitment: you operate a warehouse (or use Redshift Serverless) and maintain load pipelines. Redshift Spectrum blurs the edge by letting Redshift query S3 data through the same Glue catalog, joining warehouse tables with lake data in one SQL statement.
Amazon EMR is the managed big-data cluster — Spark, Hadoop, Hive, Presto — for when you need framework-level control: custom Spark applications, specific library versions, machine-learning pipelines, or long-running distributed jobs that SQL cannot express. It is the most powerful and the most operationally expensive of the three.
| Athena | Redshift | EMR | |
|---|---|---|---|
| Model | Serverless SQL on S3 | Loaded data warehouse | Managed Spark/Hadoop cluster |
| Best for | Ad hoc, occasional queries on the lake | Repeated heavy BI at high concurrency | Custom big-data code and frameworks |
| Pricing lever | Per data scanned | Warehouse capacity | Cluster instances |
| Overhead | None | Moderate | Highest |
| Exam trigger | "Query S3 with SQL, serverless, occasional" | "Enterprise BI, complex joins, constant use" | "Apache Spark/Hadoop, custom processing" |
Visualization gets one line because the exam gives it one: Amazon QuickSight is the managed BI service that builds dashboards on Athena, Redshift, S3, and other sources — any "business users need dashboards" requirement resolves to it.
Expect the exam to qualify these questions hard: "serverless" plus "infrequent" eliminates Redshift, "consistently fast dashboards for hundreds of analysts" eliminates Athena, and a named framework like Spark with custom code eliminates both in favor of EMR — unless Glue's serverless Spark covers it with less overhead.
Format performance: Parquet, compression, and partitioning
The single most repeatable optimization in this task statement is a format change. Row-based text formats like CSV and JSON force a query engine to read every byte of every record even when the query touches two columns. Columnar formats — Apache Parquet and ORC — store each column's values together, so Athena reads only the columns the query names; they also compress far better, because a column of similar values compresses more tightly than interleaved rows. Since Athena bills per data scanned, converting a lake from CSV to compressed Parquet routinely cuts both query cost and query time by large multiples — same data, same SQL, a fraction of the bytes touched.
Partitioning is the second lever. Organizing S3 objects by key prefix — most commonly date, as in year=2026/month=07/day=15/ — lets the catalog record each partition's location, and a query filtered on the partition column (WHERE year = 2026 AND month = 07) skips every other partition entirely. Partition on the columns queries actually filter by; a lake partitioned by date serves "last week's events" by scanning seven days, not seven years.
You already know both conversion paths. For data already in S3, a Glue ETL job reads the CSV, writes partitioned, compressed Parquet, and a crawler updates the catalog. For streaming data, Firehose format conversion writes Parquet from the start — no post-hoc ETL at all, which wins any LEAST-overhead comparison for new pipelines. Compression (Snappy is the common default for Parquet) stacks on top of either path.
This is tested as a cost/performance scenario with a giveaway sentence: "queries scan the entire dataset," "Athena costs are growing," or "analysts only query recent data." The correct option combines columnar conversion with partitioning; distractors throw capacity at the problem — moving to Redshift, adding EMR nodes — when the data layout was the actual defect.
The end-to-end pattern: ingest, transform, store, query, visualize
Task 3.5 questions increasingly describe whole pipelines, and the strongest preparation is holding the reference chain in your head: ingest → transform → store → catalog → query → visualize, with two or three service candidates at each stage.
A representative streaming architecture: producers (applications, IoT devices, clickstream collectors) write to Kinesis Data Streams if real-time consumers, replay, or per-key ordering are required — otherwise straight into Amazon Data Firehose. Firehose applies an inline Lambda transform if records need cleaning, converts to Parquet, and delivers into partitioned prefixes in the S3 data lake. A Glue crawler keeps the Data Catalog current; Lake Formation governs who can query which tables and columns. Athena serves ad hoc SQL, heavy repeated BI loads into Redshift, custom Spark jobs run on EMR or serverless Glue, and QuickSight dashboards sit on top. Batch and file-based sources merge into the same lake through DataSync schedules or Transfer Family endpoints.
Reading a pipeline question, work stage by stage and eliminate per stage: does ingestion need consumers or just delivery? Does transformation need a cluster or does Glue/Firehose cover it? Does querying justify a warehouse or is pay-per-scan Athena enough? Each stage usually has exactly one qualifier word — "near-real-time," "no infrastructure to manage," "ad hoc" — that fixes the choice.
Frequency and volume clues size the ingestion stage. Continuous record-by-record arrival is streaming; hourly or nightly batches are transfer or scheduled ETL; a one-time bulk load is DataSync or Snow depending on the network. Where throughput numbers appear, they select capacity, not service internals: a provisioned Data Streams shard ingests up to 1 MB or 1,000 records per second, so stated rates translate to a shard count — and if the scenario calls the traffic spiky or unpredictable, on-demand mode (or Firehose, which scales invisibly) removes the sizing exercise altogether. You are never asked to compute precise capacity; you are asked to notice when a requirement outgrows a fixed configuration.
The exam tests this compositionally: four answer options each name a full chain, three of which contain one wrong link — Data Streams with no consumer, EMR for a trivial format conversion, Redshift for occasional queries. Verify every link, not just the first.
Worked scenarios: reasoning through Task 3.5 questions
Scenario 1. A media company collects clickstream events from its web applications and must land them in an S3 data lake in Apache Parquet format for analysis with Athena. Near-real-time delivery (within minutes) is acceptable. The team wants a solution with the LEAST operational overhead and does not want to write or manage any consumer applications. What should the architect choose?
Reasoning: Strike the options stage by stage. Kinesis Data Streams with a Lambda consumer writing Parquet works, but it exists to serve custom real-time consumers — the scenario explicitly rules out consumer code, and the Lambda plus its error handling is precisely the overhead being minimized. MSK requires Kafka clients and cluster-adjacent management with no Kafka requirement in sight. A Glue batch job converting CSV drops on a schedule fails "near-real-time" and adds a second hop. The answer is Amazon Data Firehose with its built-in format conversion to Parquet, delivering directly into partitioned S3 prefixes: fully managed, no consumers, no shards, near-real-time by design — and its buffering delay is acceptable because the scenario said minutes are fine. Every requirement sentence maps to a Firehose property; that alignment is what a correct SAA-C03 answer looks like.
Scenario 2. An analytics team queries three years of CSV application logs in S3 using Athena. Queries have grown slow and expensive; the team reports that even queries filtered to a single week "scan the entire dataset." They want to reduce Athena cost and query time with the LEAST change to their workflow. What do you recommend?
Reasoning: The complaint names both defects. "CSV" means every query reads every byte of every row — the fix is a Glue ETL job converting the logs to compressed Parquet, so Athena scans only the referenced columns. "A single week scans everything" means the data is unpartitioned — the fix is writing the Parquet output partitioned by date and recrawling so the catalog knows the partitions; week-filtered queries then touch only seven partitions. Together the two changes cut billed bytes on both axes while the team keeps the same Athena SQL workflow. The distractors fail the qualifier: migrating to Redshift solves speed by adding a warehouse to load, operate, and pay for — a workflow change, not a data-layout fix; EMR with Presto swaps serverless for a cluster; and "increase Athena capacity" is not a lever that exists — Athena is serverless, and its cost dial is bytes scanned.
Scenario 3. Hundreds of retail partners currently upload nightly inventory files over SFTP to an on-premises server, which is being retired. Files must end up in S3 for a Glue pipeline, and partners cannot change their upload tooling. What replaces the server?
Reasoning: "Partners keep using SFTP" plus "files into S3" is the signature of AWS Transfer Family: a managed SFTP endpoint backed directly by S3, per-partner credentials, nothing to patch. DataSync is wrong-shaped — it is the company pulling data from its own storage, not partners pushing; Storage Gateway serves ongoing on-premises access to AWS-resident data, and an EC2-hosted SFTP server recreates the retired problem inside AWS. When the protocol is fixed by an external party, pick the service that speaks it natively.
Tip. SAA-C03 tests this task as service selection under qualifiers: a streaming requirement plus "no consumer code / deliver to S3 / near-real-time / least overhead" selects Firehose, while "real-time processing," "replay," or "ordering" selects Data Streams and the word "Kafka" selects MSK. Transfer questions hinge on frequency and access clues — scheduled copy (DataSync), ongoing hybrid access (Storage Gateway), partner SFTP (Transfer Family), offline bulk (Snow). Expect the Athena cost/performance scenario where CSV-to-Parquet conversion plus date partitioning beats capacity-shaped distractors like migrating to Redshift, and a governance question where Lake Formation's centralized column-level permissions beat hand-built bucket-policy sprawl. Traps to expect: Data Streams offered where nobody will write a consumer, EMR offered for a routine transformation Glue handles serverlessly, and Redshift offered for occasional ad hoc queries that Athena serves without infrastructure.
- Kinesis Data Streams = real-time with custom consumers, replay (up to 365-day retention), and per-shard ordering via partition key; on-demand mode when throughput is unpredictable.
- Amazon Data Firehose = fully managed near-real-time delivery to S3, Redshift, or OpenSearch with buffering, inline Lambda transforms, and built-in conversion to Parquet — no consumers, no shards, no replay.
- "Kafka" in the scenario means Amazon MSK; the classic composite is Data Streams for real-time consumers with Firehose archiving the same stream to S3.
- Transfer selection: DataSync = one-time or scheduled copies into S3/EFS/FSx; Storage Gateway = ongoing hybrid access; Transfer Family = managed SFTP/FTPS into S3; Snow family = offline bulk.
- The data lake is S3 plus the Glue Data Catalog; Lake Formation centralizes database/table/column-level permissions enforced across Athena, Redshift Spectrum, EMR, and Glue.
- Glue crawlers infer schemas into a catalog shared by Athena, EMR, and Redshift Spectrum; Glue jobs are the serverless (LEAST-overhead) way to run ETL like CSV-to-Parquet.
- Query selection: Athena for serverless ad hoc SQL on S3 (pay per data scanned), Redshift for repeated heavy BI on loaded data, EMR for custom Spark/Hadoop control; QuickSight for dashboards.
- Columnar Parquet/ORC plus compression plus date partitioning is THE Athena cost/performance fix — via a Glue job for existing data or Firehose format conversion for new streams.
Frequently asked questions
What is the difference between Kinesis Data Streams and Kinesis Data Firehose?
Kinesis Data Streams is a real-time streaming buffer for your own consumer applications: records are retained (24 hours by default, up to 365 days), can be replayed, and stay ordered within a shard, but you write and operate the consumers. Amazon Data Firehose (formerly Kinesis Data Firehose) is a fully managed delivery service: it buffers incoming data and writes it to S3, Redshift, OpenSearch Service, or other destinations near-real-time, optionally transforming records with Lambda and converting them to Parquet — with no consumers, shards, or administration. Choose Streams when code must process events in real time or replay them; choose Firehose when the data just needs to land in a destination.
When should I use Amazon MSK instead of Kinesis?
Use Amazon MSK (Managed Streaming for Apache Kafka) when the scenario requires Apache Kafka compatibility: existing producer or consumer applications written against Kafka APIs, a migration of a self-managed Kafka cluster, or dependence on Kafka ecosystem tooling. MSK runs real Kafka as a managed service, so those applications work without rewriting. If there is no Kafka requirement, Kinesis Data Streams or Data Firehose is normally the lower-overhead answer on the exam — MSK's differentiator is compatibility, not simplicity.
What is the difference between AWS DataSync and Storage Gateway?
DataSync moves data: it copies files from on-premises NFS, SMB, or HDFS storage into S3, EFS, or FSx, either one time for a migration or on a recurring schedule, with encryption and integrity checks built in. Storage Gateway provides ongoing hybrid access: on-premises applications keep reading and writing through a local gateway (file, volume, or tape) while the data actually lives in AWS. The test is what happens after the data arrives — if on-premises systems still need low-latency access to it, that is Storage Gateway; if the data simply needs to be transferred into AWS for use there, that is DataSync.
What does AWS Lake Formation actually do?
Lake Formation is the governance layer for a data lake built on S3 and the Glue Data Catalog. Its core job is centralized, fine-grained permissions: you grant principals access at the database, table, and even column level in one place, and those grants are enforced consistently when the data is queried through Athena, Redshift Spectrum, Glue, or EMR. Without it, you would maintain the same rules as a sprawl of S3 bucket policies and per-service IAM policies. It also assists with setting up the lake — registering S3 locations and cataloging data — but on the exam, "centrally manage fine-grained access to a data lake" is its signature.
Should I use Athena or Redshift for querying data in S3?
Use Athena when queries are ad hoc, interactive, or infrequent and the data can stay in S3: it is serverless, needs no loading, uses the Glue Data Catalog for schemas, and charges per data scanned — ideal for log analysis and occasional reporting with zero infrastructure. Use Redshift when the workload is a repeated, heavy BI pattern — dashboards and complex joins running constantly at high concurrency — where loading data into a warehouse pays off in consistent performance. Redshift Spectrum covers the middle ground by letting a Redshift cluster query S3 data through the same catalog and join it with warehouse tables.
How do I reduce Athena query costs?
Reduce the bytes each query scans, because that is what Athena bills. Three compounding techniques: convert row-based formats like CSV and JSON to a columnar format (Apache Parquet or ORC) so queries read only the columns they reference; compress the data, which columnar formats do very efficiently; and partition objects by the columns queries filter on — usually date — so filtered queries skip irrelevant partitions entirely. Run the conversion as an AWS Glue ETL job for data already in S3, or enable Firehose format conversion so streaming data arrives as Parquet from the start, then recrawl so the Data Catalog registers the partitions.
How do I convert CSV files to Parquet in AWS?
Two managed paths, chosen by where the data is. For files already in S3, create an AWS Glue ETL job: it reads the CSV (using a schema a Glue crawler inferred into the Data Catalog), writes compressed, optionally partitioned Parquet back to S3, and can run on a schedule or trigger — no cluster to manage. For streaming data that has not landed yet, enable record format conversion on Amazon Data Firehose, which converts incoming JSON to Parquet or ORC before delivery to S3, eliminating the ETL step entirely. EMR with Spark can also do the conversion but is the higher-overhead option unless you already need cluster-level control.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.