The AWS Glue questions data-engineering interviews actually ask — crawlers, the Data Catalog, DynamicFrames, job bookmarks, and when Glue beats EMR or Lambda — with full answers.
By Durgesh Yadav — Senior Data Engineer @ 7-Eleven · Updated 29 Jul 2026. Preparation guidance, not a hiring guarantee.
AWS Glue interviews test the serverless ETL workflow: crawlers populating the Data Catalog, writing Glue jobs in Spark or Python shell, DynamicFrames versus Spark DataFrames, job bookmarks for incremental loads, and choosing Glue over EMR or Lambda for a given workload.
Interviewers want to know you understand Glue as a managed Spark-plus-catalog service, not just its buttons. Expect questions on the flow from a crawler inferring schema into the Glue Data Catalog, to a job reading that catalog, transforming data, and writing partitioned output to S3. They probe whether you know DynamicFrames (Glue's schema-flexible abstraction) versus Spark DataFrames, when to convert between them, and how job bookmarks let a job process only new data on each run. For data-engineering roles in India's GCCs and product companies, Glue often appears alongside S3, Athena, and Redshift, so they check that you can place it correctly in a lakehouse.
Crawler to Data Catalog to job to S3 flow
DynamicFrame vs DataFrame and when to convert
Job bookmarks for incremental processing
Where Glue sits with S3, Athena, and Redshift
How should you prepare for a Glue interview?
Build one end-to-end job you can talk through: a crawler over raw S3 data, a job that cleans and partitions it, and a second crawler or Athena query over the output. Learn the two job types — Spark (for large distributed transforms) and Python shell (for small, single-node tasks) — and when each fits. Be able to explain DynamicFrame resolveChoice, ApplyMapping, and relationalize at a conceptual level. Understand that Glue pricing is per DPU-hour, so cost questions come down to job duration and worker count. Practice describing partitioning and predicate pushdown, since interviewers use them to test whether you can make Glue jobs cheap and fast.
Build one crawler-to-job-to-S3 pipeline you can narrate
Know Spark jobs vs Python shell jobs and their fit
Explain DPU-hour cost and how partitioning cuts it
Practice ApplyMapping, resolveChoice, and relationalize
Which mistakes do Glue candidates make?
The frequent miss is treating Glue as only a UI — strong candidates explain what happens underneath: Glue provisions Spark on managed workers, and a DynamicFrame is a wrapper that tolerates inconsistent schemas that would break a strict DataFrame. Another mistake is not knowing when NOT to use Glue: for a tiny event-driven transform, Lambda is cheaper and faster to start; for heavy, highly-tuned Spark with custom dependencies, EMR gives more control. Candidates also forget that crawlers cost money and can misinfer schema, so re-running them blindly is a real-world anti-pattern. Finally, many can't explain job bookmarks, which is the exact feature interviewers use to test incremental-load understanding.
Explain the managed Spark underneath, not just the console
Say when Lambda or EMR beats Glue
Know crawlers cost money and can misinfer schema
Be ready to explain job bookmarks precisely
Glue, EMR or Lambda — how do you choose?
This comparison is almost guaranteed. Frame it by workload: Glue is serverless Spark with a built-in catalog, best for standard batch ETL where you want no cluster management. EMR is a managed Hadoop/Spark cluster, best when you need fine-grained tuning, custom libraries, long-running jobs, or non-Spark tools like Hive and Presto, and when sustained usage makes a persistent cluster cheaper. Lambda is best for small, event-driven transforms that finish within its time and memory limits, with near-instant start and the lowest cost at low volume. The senior answer names the deciding factors — cluster control, startup latency, cost at your volume, and whether you need the Data Catalog — rather than declaring one universally best.
Glue: serverless batch ETL, no cluster to manage
EMR: control, custom libs, long jobs, non-Spark tools
Lambda: small event-driven transforms, instant start
Decide on control, latency, cost, and catalog need
Question bank
16 interview questions with answers
Real questions from beginner to advanced, each with a concise model answer — practice them, then rehearse live in a mock interview. Every answer is open; collapse any you have already covered.
EasyWhat is AWS Glue?
AWS Glue is AWS's serverless data integration service: you submit ETL jobs and Glue provisions, scales, and tears down the underlying Apache Spark environment, billed per DPU-hour with no clusters to manage. Interviewers expect you to name its three core pieces: the Data Catalog (a central, Hive-compatible metastore shared with Athena, EMR, and Redshift Spectrum), crawlers (which infer schemas and register tables), and jobs (distributed Spark, Spark streaming, or single-node Python shell). The classic trap is describing Glue as storage or a database — it holds only metadata; the data itself stays in S3, JDBC sources, and so on. Pre-empt the follow-up: Glue suits intermittent batch ETL; long-running, heavily tuned, or non-Spark workloads often fit EMR better.
EasyWhat is the Glue Data Catalog used for?
The Data Catalog is a central, Hive-metastore-compatible store of metadata: databases, tables, column types, partition keys and locations, plus connection definitions. It never holds data — only schemas and pointers describing data that lives in S3 or JDBC stores. Its value is that one definition is shared everywhere: crawlers and Glue jobs write to it, while Athena, Redshift Spectrum, and EMR read from it, so a table defined once serves every engine. Partitions are first-class catalog entries, which is exactly what lets query engines prune S3 prefixes instead of scanning everything. Two follow-ups worth pre-empting: it can replace a self-managed Hive metastore on EMR, and Lake Formation layers fine-grained, column-level permissions on top of catalog resources.
EasyWhat does a Glue crawler do?
A crawler connects to a data store (an S3 path, JDBC database, or DynamoDB table), samples the data, uses classifiers to detect the format — JSON, CSV, Parquet, or a custom grok/regex classifier — infers the schema and the partition layout from the folder structure, and creates or updates tables in the Data Catalog. Scheduled crawls pick up new partitions automatically. The nuance interviewers probe: inference is sample-based, so mixed-type columns or inconsistent files can produce wrong schemas, and a re-crawl can overwrite manual corrections unless you set the update behavior to log-only or add-new-columns-only. Also know the cheaper alternative: for stable schemas, registering new partitions via ALTER TABLE ADD PARTITION in Athena or a Glue API call beats re-crawling the whole store.
EasyWhat are the two types of Glue jobs?
Spark ETL jobs and Python shell jobs. Spark jobs run distributed PySpark or Scala across a fleet of workers and are the default for large-scale transforms; a streaming variant of the Spark job reads micro-batches from Kinesis or Kafka. Python shell jobs run a single plain-Python process — no Spark at all — sized at a fraction of a DPU, which makes them right for small files, API calls, orchestration glue, or loading a lookup table. The classic follow-up is 'when would you NOT use Spark?': if the data fits comfortably on one node, a Python shell job starts faster and costs far less, because a Spark job consumes a minimum number of DPUs regardless of how little work it does. Spinning up distributed Spark for a 50 MB CSV is the trap answer.
EasyWhat is a DPU in AWS Glue?
A DPU (Data Processing Unit) is Glue's unit of compute and billing — a bundle of 4 vCPUs and 16 GB of memory for a standard DPU. Jobs are billed per DPU-hour, metered by the second, so cost is workers times runtime. Worker types map onto DPUs: a G.1X worker is 1 DPU, G.2X is 2, with larger sizes for memory-heavy or skewed workloads, while Python shell jobs can run on a fraction of a DPU. The follow-up interviewers want is the tuning trade-off: doubling workers halves runtime only if the job parallelises cleanly, so at best cost stays flat — with skew, stragglers, or small data, the extra DPUs idle and you pay for nothing. The strong answer is right-sizing from executor-utilisation metrics on real runs, not defaulting to 'add more workers'.
MediumExplain the difference between a DynamicFrame and a Spark DataFrame.
A DynamicFrame is Glue's schema-flexible wrapper: each record carries its own schema, so a field can hold multiple candidate types (a 'choice' type) without failing the read — built for messy JSON and drifting sources. A Spark DataFrame commits to one fixed schema up front and gives you the full Spark SQL API with Catalyst optimisation, which generally makes it faster. DynamicFrames add ETL-specific transforms — resolveChoice, relationalize, applyMapping — plus native integration with the Data Catalog and job bookmarks. The standard pattern: read as a DynamicFrame, resolve type ambiguity, call toDF() for complex joins and window functions, then fromDF() back to write through Glue sinks. The trade-off: DynamicFrames trade some performance for tolerance of dirty data.
MediumHow do job bookmarks enable incremental processing?
Job bookmarks persist state between runs so a job processes only new data. For S3 sources Glue tracks which objects it has already read; for JDBC sources it tracks the high-water mark of designated bookmark keys, which must be strictly increasing columns like an id or updated_at timestamp. The next run resumes from that state instead of reprocessing history. Bookmarks are enabled per job (enable, disable, or pause), and each source needs a transformation_ctx argument — omitting it silently disables bookmarking for that source, which is the classic bug. Pre-empt two follow-ups: backfills require a bookmark reset or a pause window because reruns skip already-seen data, and bookmarks do not handle rows updated in place — that needs merge or upsert logic downstream.
MediumWhat is the resolveChoice transform for?
resolveChoice handles fields where a DynamicFrame detected more than one type — say user_id arrives as int in some files and string in others, producing a choice type. You pick a strategy per field: cast forces a single type, make_struct keeps both values in a struct with one member per type, make_cols splits them into user_id_int and user_id_string, and project keeps only values of one type. This matters because an unresolved choice column will break writes to strict-schema targets like Parquet or Redshift. Inline it reads: df.resolveChoice(specs=[('user_id', 'cast:long')]). The nuance interviewers want: cast silently nulls values it cannot parse, so in auditable pipelines make_cols or make_struct is safer — it preserves the bad data for inspection instead of quietly losing it.
MediumHow do you optimize the cost of a Glue job?
Cost is DPU-hours, so attack both factors. Read less: partition the S3 data and use pushdown predicates so the job loads only relevant partitions, and prune columns early — cheap with Parquet. Process less: enable job bookmarks so each run is incremental rather than a full reload. Right-size: check executor utilisation in the job metrics; if half the workers sit idle, cut the count, or use auto scaling so Glue releases idle executors. Use the cheap tiers: Python shell jobs for single-node work, and Flex execution for non-urgent batch. Compact small files, which waste listing and task overhead. The trap: 'just reduce workers' — on a well-parallelised job that stretches runtime and leaves DPU-hours unchanged. Measure DPU-hours per run, not worker count.
MediumHow do partitioning and predicate pushdown help in Glue?
Partitioning lays data out in S3 under key=value prefixes such as s3://bucket/events/dt=2024-01-01/, with each partition's location registered in the catalog. A pushdown predicate (push_down_predicate in create_dynamic_frame.from_catalog) is evaluated against that partition metadata before the read, so Glue never lists or loads excluded prefixes. That turns a full-table scan into a read of one day's folder — less S3 I/O, shorter runtime, fewer DPU-hours. Two distinctions interviewers probe: pushdown only works on partition columns — a filter on an ordinary column still reads everything and filters in memory (Parquet's min/max stats soften this) — and over-partitioning, say by user_id, creates millions of tiny files, where listing overhead costs more than the pruning saves.
MediumHow do Glue, Athena, and Redshift Spectrum relate?
They are three engines sharing one metadata layer, the Glue Data Catalog. Glue owns ETL: crawl sources, transform, write curated data — ideally partitioned, compressed Parquet — to S3, and register the tables. Athena runs serverless SQL directly over those same catalog tables, billed per TB scanned. Redshift Spectrum lets an existing Redshift cluster join its local warehouse tables against the same S3 external tables through an external schema mapped to the catalog. Define a table or add a partition once and all three see it immediately. The point to land: Glue prepares, Athena serves ad-hoc exploration, Spectrum serves warehouse joins. And since Athena and Spectrum bill by data scanned, Glue's conversion to partitioned columnar formats is precisely what makes the whole stack cheap.
MediumWhat is the relationalize transform used for?
relationalize flattens deeply nested, semi-structured data into a set of flat relational tables. Nested structs become dotted columns, and every array is pivoted out into its own child table linked back to the parent by a generated id and index. It returns a DynamicFrameCollection — one root frame plus one frame per exploded array — which you write out as separate tables, e.g. orders and orders_items. That is the standard route for landing JSON API payloads into Redshift or another strict relational target. Contrast: plain structs only need dot-notation in applyMapping; relationalize earns its place for arrays of objects nested at multiple levels. Gotchas: it requires a staging path for intermediate data, and the generated keys are join keys for that run only, not stable business keys.
HardWhen would you choose Glue over EMR, and when the reverse?
Glue wins for managed, intermittent batch ETL: no cluster operations, per-second serverless billing, catalog and bookmark integration built in, minutes to stand up. EMR wins when you need control: specific Spark or Hadoop versions, custom libraries and AMIs, non-Spark engines like Trino, Hive, HBase, or Flink, long-running or interactive clusters, deep JVM tuning, or spot-instance strategies that undercut Glue's DPU pricing at sustained volume. The cost crossover is real: a job running most of every day is usually cheaper on a right-sized EMR cluster, while a 20-minute nightly job is cheaper on Glue. Team shape matters too: Glue suits teams that do not want to own infrastructure. Default to Glue for standard scheduled Spark ETL; move to EMR only on a concrete limitation you can name.
HardHow would you handle schema evolution in a Glue pipeline?
First decide who owns the schema. If the crawler owns it, set the update behavior so new columns are added but existing definitions are never overwritten — a naive re-crawl clobbering a manually corrected schema is the classic incident. If the job owns it, read with DynamicFrames, absorb type drift with resolveChoice, and use applyMapping to project the contract you promise downstream. Validate at the boundary: quarantine records that break the contract rather than letting nulls propagate. For fast-evolving data, the stronger answer is an open table format — Iceberg, Hudi, or Delta on S3, all usable from Glue — which gives real schema evolution with history. The principle: additive changes are safe; renames and type narrowing are breaking and should be versioned, not patched in place.
HardA Glue job is running slowly and costing too much. How do you diagnose it?
Start with evidence: enable the Spark UI and job metrics and see where time goes. One straggling task means skew — salt the hot keys or repartition. Heavy shuffle volume means wide transforms to reduce or reorder. Disk spill means memory pressure — larger workers, not more of them. Check the read path: is the pushdown predicate actually pruning partitions, or is the job listing all of S3? Many small files are the most common silent killer — compact them or use groupFiles/groupSize on the read. Idle executors mean over-provisioning — cut workers or enable auto scaling. Confirm bookmarks are on so you skip already-processed data, and check formats: gzipped CSV is unsplittable, so one file pins one core; convert to Parquet. The point is order: measure, fix the dominant bottleneck, re-measure.
HardHow do you orchestrate multiple Glue jobs with dependencies?
Within Glue, use triggers and Workflows: a trigger fires a job or crawler on a schedule, on demand, or conditionally on the completion of others, and a Workflow groups the DAG with shared run properties and one view of execution. That covers linear crawl-transform-load chains well. For branching, retries with backoff, error fan-out, or steps in other services (Lambda, ECS, Athena), move up to Step Functions, which has native Glue integration, or Managed Airflow when the team thinks in DAG code and needs rich backfills. Use EventBridge for event-driven starts, e.g. on S3 object arrival, instead of polling schedules. The senior points: keep every job idempotent so retries are safe, and keep dependency logic in the orchestrator, not buried inside jobs, so each stays independently runnable.
By company
Data Engineer interviews that ask these questions
See how this topic shows up in real Data Engineer loops — rounds, difficulty and company-specific questions:
The Data Catalog is Glue's central metadata store: it holds table definitions, schemas, and partitions for data sitting in S3 and other sources. Crawlers populate it by inferring schema, and Glue jobs read from it. Its value is that other services — Athena, Redshift Spectrum, and EMR — can query the same catalog, so one schema definition serves the whole analytics stack.
What is the difference between a DynamicFrame and a DataFrame in Glue?
A DynamicFrame is Glue's own abstraction that tolerates inconsistent or unknown schemas, keeping multiple possible types per field until you resolve them — useful for messy source data. A Spark DataFrame requires a fixed schema and unlocks the full Spark SQL API. In practice you often read as a DynamicFrame, clean and resolve types, convert to a DataFrame for complex transformations, then convert back to write.
What are Glue job bookmarks?
Job bookmarks track what a job has already processed so that subsequent runs handle only new data. Glue persists state about processed files or records; on the next run it skips what it saw before. This is how you build incremental ETL in Glue without manually filtering by date, and interviewers use it to check that you understand incremental versus full loads.
When should you use EMR instead of Glue?
Choose EMR when you need cluster-level control: custom Spark configurations or libraries, long-running or interactive jobs, non-Spark tools like Hive, Presto, or HBase, or sustained workloads where a persistent, right-sized cluster is cheaper than repeated serverless runs. Glue wins when you want standard batch Spark ETL with zero cluster management and tight Data Catalog integration.
What is a Glue crawler and what are its downsides?
A crawler scans a data source, infers schema and partitions, and writes table definitions into the Data Catalog. Its downsides: it costs money per run, it can misinfer types on messy or evolving data, and re-running it blindly can overwrite a hand-corrected schema. Many teams crawl once to bootstrap, then manage schema explicitly rather than crawling on every load.
Next Step
Turn The Guide Into Practice
Use PrepNPlaced tools to turn this learning path into resume proof, targeted practice, and interview-ready explanations.