A cloud-native AWS data engineering project that ingests YouTube trending video data, stores raw JSON in S3, cleans it in Glue, and builds a curated analytics layer for reporting and exploration.
This project demonstrates a complete data lake pipeline using:
- AWS Lambda for ingestion
- Amazon S3 for raw and processed storage
- AWS Glue for ETL and transformation
- Glue Data Catalog for metadata management
- Athena / SQL-friendly data access for analytics
- AWS IAM and Step Functions for orchestration and access control
The pipeline is designed to collect trending statistics from the YouTube Data API and convert them into structured, cleaned, and aggregated datasets across Bronze, Silver, and Gold layers.
YouTube Data API
β
βΌ
Lambda: youtube-api-ingestion
β
βΌ
S3 Bronze Layer
β
βΌ
AWS Glue: Bronze β Silver Job
β
βββ cleaned statistics data
βββ category/reference data
βββ data quality checks
β
βΌ
AWS Glue: Silver β Gold Job
β
βββ region summary
βββ daily trending analytics
βββ channel analytics
.
βββ README.md
βββ data_quality/
β βββ dq_lambda.py
βββ Glue_jobs(ETL job)/
β βββ yt-data-pipeline-bronze-to-silver-nikhil/
β β βββ script
β βββ yt-data-pipeline-silver-to-gold-nikhil/
β βββ script
βββ iam_permission/
β βββ yt-data-pipeline-glue-role-nikhil
β βββ yt-data-pipeline-lambda-role-nikhil
β βββ yt-data-pipeline-stepfunction-role-nikhil
βββ lambda/
β βββ json-to-parquet/
β β βββ lambda_function.py
β βββ youtube-api-ingestion/
β βββ lambda_function.py
βββ scripts/
β βββ iam-role.sh
β βββ information.sh
βββ step_function/
β βββ yt_data_pipeline_orcherstration
βββ .gitignore
Raw JSON is stored in S3 after ingestion from the YouTube API. Files are organized by region and time partition, for example:
youtube/raw_statistics/region=US/date=2026-08-26/hour=14/<timestamp>.json
The Bronze-to-Silver Glue job reads the raw records, explodes the API response items, cleans and validates the data, and writes Parquet data to the Silver layer.
The Silver dataset includes:
- video metadata
- channel information
- region and date
- engagement metrics
- derived columns such as like ratio and engagement rate
The Silver-to-Gold Glue job reads the cleaned statistics and builds analytical aggregates such as:
- region-wise summaries
- trending-date reports
- channel performance summaries
Location:
lambda/youtube-api-ingestion/lambda_function.py
This Lambda:
- calls the YouTube Data API v3
- retrieves trending videos for configured regions
- pulls category reference data
- stores JSON payloads in the Bronze bucket
- sends an SNS alert on partial failures
Location:
lambda/json-to-parquet/lambda_function.py
This Lambda:
- reads JSON reference files from S3
- normalizes nested JSON structures
- cleans category data
- writes transformed Parquet data to the Silver layer
Location:
Glue_jobs(ETL job)/yt-data-pipeline-bronze-to-silver-nikhil/script
This script:
- reads raw JSON from Bronze S3
- validates required fields
- filters bad records
- standardizes region values
- removes duplicate video records
- calculates derived metrics
- writes Parquet to the Silver bucket and Glue Catalog
Location:
Glue_jobs(ETL job)/yt-data-pipeline-silver-to-gold-nikhil/script
This script performs aggregate transformations for reporting and analytical consumption.
Location:
data_quality/dq_lambda.py
This handles data quality checks and alerting to support pipeline reliability.
- Amazon S3
- AWS Lambda
- AWS Glue
- AWS Step Functions
- Amazon SNS
- AWS IAM
- AWS Athena (for querying curated data)
YOUTUBE_API_KEYS3_BUCKET_BRONZEYOUTUBE_REGIONSSNS_ALERT_TOPIC_ARN
S3_BUCKET_SILVERGLUE_DB_SILVERGLUE_TABLE_REFERENCESNS_ALERT_TOPIC_ARN
The Bronze-to-Silver job uses parameters such as:
--JOB_NAME--bronze_bucket--bronze_database--bronze_table--silver_bucket--silver_database--silver_table
The Silver-to-Gold job uses parameters such as:
--JOB_NAME--silver_database--gold_bucket--gold_database
- Create IAM roles from the files in
iam_permission/. - Deploy the Lambda functions from the
lambda/directory. - Configure the Bronze and Silver S3 buckets.
- Run the Bronze-to-Silver Glue job.
- Validate the Silver table and schema.
- Run the Silver-to-Gold Glue job.
- Use Athena or downstream reporting tools for analytics.
- This project is built around a practical AWS data engineering workflow using live YouTube data.
- Several fixes were applied in the Glue scripts for issues such as missing args, bucket hardcoding, incorrect columns, and partition mismatch.
- The pipeline uses clean partitioning and catalog metadata to make data easier to query and maintain.
- Add Step Functions scheduling and orchestration
- Add robust error handling and retry logic
- Add automated quality metric reporting
- Integrate with QuickSight or dashboarding tools
- Add CI/CD deployment automation for AWS resources
This project is intended for learning, portfolio, and internal engineering use. Update the license if you plan to share it publicly under different terms.