Data Ingestion and Transformation · Topic 4 of 8
Choosing a Processing Service
Decide between AWS Glue, Amazon EMR, Lambda, Athena and Redshift for data transformation, including EMR deployment options and when serverless wins.
- 5 min
- Includes a diagram
- Glue is the serverless Spark ETL service. EMR gives control over the framework and cluster.
- EMR Serverless and Glue both avoid cluster management. Pick EMR when a specific open source stack is required.
- Lambda runs at most 15 minutes per invocation, so it is for small or event driven transforms.
What it is
Many AWS services can transform data. The exam gives you a scenario with data size, skills, cost goals and operational effort, and asks which one fits best.
The core question is how much control you need compared with how much infrastructure you want to manage. Serverless services reduce operations, while cluster based services give more tuning and framework choice.
How it works
The main candidates
| Service | Best for | Operational effort |
|---|---|---|
| AWS Lambda | Small, event driven transforms of a file or batch of records | Very low, but each run is limited to 15 minutes |
| Amazon Athena | SQL transforms on S3 data using CTAS and INSERT INTO | Very low, pay per data scanned |
| AWS Glue | Serverless Apache Spark ETL, Python shell jobs, streaming ETL | Low, no cluster to manage |
| Amazon EMR | Big data frameworks (Spark, Hive, Presto, Flink, HBase) with full control | Higher, you size and tune |
| Amazon Redshift | SQL transforms inside the warehouse (ELT) | Low to medium |
Glue is the default answer for "serverless ETL". EMR is the answer when the scenario needs a specific framework or version, custom libraries at the cluster level, very large long running jobs, or fine control over instances.
Lambda in transformation
Lambda suits small, bursty work, such as converting a file that has just landed in S3. A function can run for at most 15 minutes, so large jobs do not fit. Memory and the temporary /tmp space are configurable up to 10 GB, which helps with moderate files.
Amazon EMR deployment options
EMR comes in three forms.
| Option | What it means |
|---|---|
| EMR on EC2 | A cluster of EC2 (Elastic Compute Cloud) instances that you configure |
| EMR on EKS | Spark jobs run on an existing Amazon EKS (Elastic Kubernetes Service) cluster |
| EMR Serverless | You submit jobs and AWS provisions capacity, with no cluster to manage |
A classic EMR cluster has a primary node that coordinates, core nodes that run tasks and store HDFS (Hadoop Distributed File System) data, and optional task nodes that only compute. Task nodes are a good place for Spot Instances, because losing one does not lose stored data.
For cost, use transient clusters that start, run a job and terminate, with data kept in S3 through EMRFS (the EMR file system) instead of HDFS. A long running cluster fits interactive work or constant load.
Spark and SQL transforms
Glue and EMR both run Apache Spark. A job reads data into a distributed dataset, applies transformations such as filters, joins and aggregations in parallel, and writes the result. Redshift handles the same shapes in SQL, and Athena does it on data in place.
Redshift stored procedures and INSERT INTO ... SELECT statements suit an ELT pattern, where raw data is loaded first and transformed inside the warehouse. Spectrum lets Redshift read S3 data in the same query.
Joining and enriching data
Transformations often join streams with reference data or combine files from several sources. In Glue this is a join between two datasets, in Athena it is a SQL join, and in Flink it is a streaming join against a lookup. Small reference tables can be broadcast to workers, which avoids a costly shuffle of the large side.
Cost and scaling levers
Consider the pricing model as well as the feature fit.
- Glue bills for the capacity used while a job runs, and the Flex execution class lowers cost for work that is not urgent.
- EMR can use Spot Instances and automatic scaling.
- Athena costs follow bytes scanned, so good formats and partitions save money.
- Lambda costs follow invocations and duration.
What to remember for the exam
- Glue is the serverless Spark ETL service. EMR gives control over the framework and cluster.
- EMR Serverless and Glue both avoid cluster management. Pick EMR when a specific open source stack is required.
- Lambda runs at most 15 minutes per invocation, so it is for small or event driven transforms.
- Athena can transform with
CTASandINSERT INTO, and charges for data scanned. - Use task nodes on Spot for cheap extra compute on EMR.
- Keep data in S3 and use transient EMR clusters to save cost.
- Redshift suits ELT when the data already lives in the warehouse.
- Glue Flex execution suits jobs that can wait.
Wording such as "least operational overhead" nearly always points to a serverless option: Lambda, Athena, Glue or EMR Serverless.
Common mistakes
Using Lambda for a long job. A multi hour transformation does not fit in a 15 minute function. Use Glue or EMR.
Picking EMR by default. EMR is powerful but adds operations work. If the scenario does not need cluster control, Glue is usually better.
Storing durable data on HDFS. HDFS on a transient cluster vanishes when the cluster ends, so keep results in S3.
Forgetting task nodes hold no HDFS data. That is why they suit Spot, while core nodes hold data and are riskier on Spot.
Spot Instances can be reclaimed at any time, so avoid them for the primary node of a cluster.
Check yourself
Which service gives serverless Apache Spark ETL with the least management?
AWS Glue.
Why use task nodes on Spot Instances in EMR?
Task nodes store no HDFS data, so losing one only slows the job.
When is Lambda a poor fit for transformation?
When a job needs more than 15 minutes or large memory beyond its limits.
Topic 4 of 8 in Data Ingestion and Transformation
Test yourself on Data Ingestion and Transformation
The full AWS DEA-C01 question bank has 845 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.