Skip to Content

AWS Glue

AWS Glue as serverless ETL, converting data to Parquet for Athena, the Glue Data Catalog and crawlers, and job bookmarks, DataBrew, Glue Studio and streaming ETL.

What it is

AWS Glue is a managed extract, transform and load (ETL) service.

  • Useful to prepare and transform data for analytics.
  • Fully serverless: no cluster to manage; jobs run on a managed Apache Spark engine (or Python shell).
  • Connects to more than 70 data sources: for example, extract from S3 and RDS, transform, and load into a Redshift data warehouse.

Convert data to Parquet

Converting data to Parquet with Glue: a CSV file uploaded to the input bucket sends an S3 event to a Lambda function or EventBridge, which starts a Glue ETL job that reads the CSV and writes Parquet to the output bucket, where Athena queries it more cheaply Converting data to Parquet with Glue: a CSV file uploaded to the input bucket sends an S3 event to a Lambda function or EventBridge, which starts a Glue ETL job that reads the CSV and writes Parquet to the output bucket, where Athena queries it more cheaply

CSV in, Parquet out, cheaper Athena queries.

A classic pattern:

  1. Files are uploaded (S3 PUT) as CSV to an input bucket.
  2. An S3 event notification triggers a Lambda function (EventBridge works too), which starts a Glue ETL job.
  3. The job converts the data to Parquet and writes it to an output bucket.
  4. Athena queries the Parquet files: much less data scanned, so faster and cheaper.

Glue Data Catalog

Glue Data Catalog: a Glue crawler reads data in S3, RDS, DynamoDB and JDBC databases, infers the schema and writes table metadata to the Data Catalog, which Athena, Redshift Spectrum, Amazon EMR and Glue ETL jobs use to find and read the data Glue Data Catalog: a Glue crawler reads data in S3, RDS, DynamoDB and JDBC databases, infers the schema and writes table metadata to the Data Catalog, which Athena, Redshift Spectrum, Amazon EMR and Glue ETL jobs use to find and read the data

One catalogue of datasets for every analytics service.

The Glue Data Catalog is a catalogue of datasets: databases and tables that hold metadata (schema, format, location), not the data itself.

  • A Glue crawler connects to S3, RDS, DynamoDB or any JDBC database, infers the schema and writes the metadata into the catalog.
  • Glue jobs use it for ETL.
  • Athena, Redshift Spectrum and EMR use it for data discovery: they read table definitions from the catalog to query the data.

Things to know at a high level

  • Glue job bookmarks: remember what a job already processed, to prevent re-processing old data on the next run.
  • Glue DataBrew: clean and normalize data with more than 250 pre-built transformations, visually, with no code.
  • Glue Studio: a visual interface to create, run and monitor ETL jobs.
  • Glue Streaming ETL (built on Apache Spark Structured Streaming): process streams from Kinesis Data Streams, Apache Kafka and MSK continuously.

Real-world examples

  • A logistics company crawls its S3 bucket of shipment files every night; new partitions appear in the Data Catalog, and analysts query them in Athena the next morning.
  • A bank uses a Glue job with bookmarks to load only the new transaction files from S3 into Redshift each hour.

Exam tips

  • "Serverless ETL", "transform data for analytics" → Glue.
  • "Convert CSV to Parquet (or ORC) to reduce Athena cost" → Glue ETL job.
  • "Discover data and build a schema automatically" → Glue crawler + Data Catalog.
  • "Central metadata store for Athena, Redshift Spectrum and EMR" → Glue Data Catalog.
  • "Don't reprocess data already handled" → job bookmarks.
  • "Clean data visually without code" → Glue DataBrew.

Common traps

  • "The Data Catalog stores the data." It stores only metadata; the data stays in S3 or the database.
  • "Glue needs a cluster." It's serverless.

Check yourself

Glue jobs bill per DPU-hour (about $0.44, with a 1-minute minimum), so instead:

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt