PostgreSQL to S3 Data Lake with AWS Glue

Load healthcare data from PostgreSQL into an S3 data lake using AWS Glue, Parquet, Glue Catalog, Athena, and scheduled batch runs.
AWS • Ingestion • Beginner • Healthcare

Architecture Diagram

Build this project

Included in Data0to1 Project Library

PROJECT PREVIEW

Watch this project preview

See the project files, architecture flow, execution steps, and final cloud output before you start building.

What this project solves

Healthcare applications store day-to-day data such as patients, providers, encounters, diagnoses, medications, vitals, allergies, and discharge information inside operational databases.

But analytics teams should not directly depend on the application database for reporting. In real projects, this data is usually moved into a data lake first, where it can be stored safely, queried, and reused by downstream pipelines.

In this pipeline, you will load healthcare data from PostgreSQL into Amazon S3 using AWS Glue. You will store the data as Parquet files, catalog it for Athena querying, and schedule the ingestion so the pipeline can run repeatedly instead of as a one-time load.

What you’ll build

  • Set up a PostgreSQL healthcare source database
  • Connect AWS Glue to the PostgreSQL source
  • Extract healthcare tables using a Glue job
  • Load data into Amazon S3 as Parquet files
  • Catalog S3 data using Glue Crawler / Data Catalog
  • Query the loaded data using Amazon Athena
  • Schedule repeatable batch runs using Glue Workflows and Triggers

How you’ll build it

  • Prepare the PostgreSQL source tables and AWS connection settings
  • Create an AWS Glue job to read data from PostgreSQL
  • Write the extracted data into Amazon S3 in Parquet format
  • Run a Glue Crawler to register the S3 tables for Athena
  • Schedule and validate the ingestion workflow using Glue Triggers and Athena queries

Tools you’ll use

PostgreSQL • AWS Glue • Amazon S3 • Glue Crawler • Athena • AWS IAM • Apache Parquet

What you’ll walk away with

After completing this pipeline, you will be able to:

  1. Explain how batch ingestion works in an AWS data lake
  2. Extract PostgreSQL data using AWS Glue
  3. Store queryable Parquet datasets in Amazon S3
  4. Catalog and query S3 data using Glue Catalog and Athena
  5. Schedule and validate repeatable ingestion runs on AWS

Ready to build this project?

Get access to the project code, setup files, architecture walkthrough, implementation videos, and support.