AWS Data Engineering
Lessons Learned from Building My Data Engineering Projects
What three end-to-end builds taught me about data engineering in the real world
🚀 1. Introduction — Why These Projects Changed Everything
When I started building my own end-to-end data engineering projects, I thought it would be “just connect a few APIs → push data → add ML → build a dashboard”.
It wasn’t.
Across three projects:
- Real-Time YouTube Sentiment Analysis (Kafka + BERT + Streamlit)
- Real-Time Traffic Analytics (Kafka + PostgreSQL + ARIMA & XGBoost)
- Spotify Serverless ETL Pipeline (Lambda → S3 → Glue → Athena)
…I faced every real-world challenge a modern data engineer normally sees in months of production work:
- Broken APIs
- SSL Kafka nightmares
- Lambda packaging headaches
- Slow SQL queries
- Crawler schema mismatches
- Data exploding in unexpected formats
- Misaligned timestamps
- Consumer lag
- Dashboards failing silently
- Event triggers not firing
- IAM permissions blocking everything
But those challenges are exactly what gave me the most important learning.
This blog is a collection of those lessons — raw, practical, and straight from the trenches.
1.1 Architecture Snapshots (Overview of All Three Projects)
👉 The following combined diagram shows the high-level architecture of all three projects covered in this article.

This combined diagram visualizes the high-level architecture of the three projects discussed in this article:
(1) Real-Time YouTube Sentiment Analysis
(2) Real-Time Traffic Analytics with Kafka + PostgreSQL + ARIMA/XGBoost
(3) Spotify Serverless ETL Pipeline built on AWS
Together, they represent streaming, batch, and serverless ETL patterns every data engineer should master.
1.2 What Each Architecture Represents
To make sure readers understand the image, add this small paragraph:
YouTube Sentiment Analysis Pipeline
Real-time comments → Kafka → TextBlob/BERT/Azure pipelines → Streamlit.
Focuses on high-velocity streaming + multi-model sentiment scoring.
Real-Time Traffic Analytics Pipeline
Chicago traffic API → Kafka → PostgreSQL → ARIMA forecasts + XGBoost predictions.
Demonstrates hybrid batch + streaming + machine learning over time-series data.
Spotify ETL Pipeline (AWS Serverless)
Lambda Extractor → S3 Raw Zone → Lambda Transformer → S3 Transformed Zone → Glue → Athena.
A pure serverless medallion-style ETL pipeline.
This section explains the visual in one glance and transitions smoothly into challenges.
🧱 2. Project 1 — Real-Time YouTube Sentiment Analysis
(Kafka + TextBlob + BERT + Azure NLP + Streamlit)
🔥 Biggest Challenges
2.1 YouTube API: “Live vs Normal Video” Hell
YouTube’s API behaves differently for:
- Uploaded videos → comments
- Live streams → chat messages
The structure isn’t the same, rate limits are different, and the activeLiveChatId only appears in specific responses.
I built the entire ingestion twice because the first version didn’t detect live streams correctly.
Lesson:
You can’t assume APIs behave consistently.
Always build ingestion with detection → branching → fallback logic.
2.2 Kafka SSL Setup on Aiven
This was the most frustrating part of the entire project.
Kafka on Aiven needs:
service.certservice.keyca.pem- SSL handshake
- Correct advertised listener config
- Correct bootstrap URL
…and everything must match.
If even one file is mis-referenced, Kafka fails silently.
There were days when my consumer wouldn’t read a single message.
Turned out my cert path had a typo. One missing character. Two hours lost.
Lesson:
SSL Kafka = 90% certificates, 10% code.
2.3 Multi-Model Sentiment Engine Was Not Simple
Running:
- TextBlob (fast)
- BERT (slow, transformer-based)
- Azure Text Analytics (API based)
…all in parallel required:
- batching
- async calls
- fallback models
- packaging BERT with correct dependencies
Lesson:
Real-time ML is not “run model → show result”.
It’s orchestration, latency budgeting, error fallback, and resource isolation.
2.4 Streamlit Live Dashboard Performance
Updating charts every 1 second?
BERT model on CPU?
Large payloads?
Yeah, Streamlit froze.
Fix:
- Cached models
- Cached API calls
- Reduced polling frequency
- Lightweight chart updates
Lesson:
Dashboards should pull minimal data, not the whole pipeline output.
🚦 3. Project 2 — Real-Time Traffic Analytics (Kafka + PostgreSQL + ARIMA + XGBoost)
🔥 Biggest Challenges
3.1 Chicago API Returns Messy Data
- Missing speed values
-1speeds- Null coordinates
- Timestamps in weird formats
- Sudden schema changes
One day the API added a column without any notice and everything broke.
Lesson:
Real-world data ingestion = continuous validation.
Never trust external sources.
3.2 PostgreSQL Performance Bottlenecks
Initially, I inserted records row-by-row → too slow.
Later I switched to:
- batch inserts
- indexing
- lowering commit frequency
- background consumers
That took ingestion from 20 seconds → 1 second.
Lesson:
Database tuning matters more than people think.
3.3 ARIMA Is Not Plug-and-Play
ARIMA needs:
- stationary data
- enough time steps
- cleaned missing values
- sorted timestamps
I quickly learned:
- ARIMA fails silently if input is dirty
- Forecasts are trash unless the data is stable
- Each street needs its own model
Lesson:
Time series forecasting = 80% preprocessing, 20% modeling.
3.4 XGBoost in Real-Time Pipelines
Training XGBoost is easy.
Serving it correctly is not.
Problems:
- Feature order mismatched
- Missing
bus_countvalues - Training with incorrect labels
- Predictions returning float instead of int
Lesson:
ML in pipelines means feature consistency, not just accuracy.
3.5 Kafka Consumer Threading
My consumer sometimes:
- got stuck
- read no records
- duplicated inserts
Fix:
- daemon thread
- consumer timeout
- proper offset management
Lesson:
Real-time consumers need guarding logic and monitoring.
🎧 4. Project 3 — Spotify ETL Pipeline on AWS
(Lambda → S3 → Glue → Athena)
🔥 Biggest Challenges
4.1 Lambda Packaging: Spotipy Not Found
Lambda does not allow pip install spotipy inside the function.
I had to:
- create a local package
- zip it
- upload as a layer
- attach layer to Lambda
Lesson:
Every external Python library = Lambda layer.
4.2 Event Trigger Logic
Trigger:
s3:ObjectCreated:*
Prefix: raw_data/to_processed/Sometimes fired twice.
Sometimes didn’t fire at all.
Why?
- Object events across regions
- Zero-byte files
- Internal S3 propagation delays
Lesson:
Event-driven architecture sounds clean but is messy in practice.
4.3 Pandas Layer for Transformation Lambda
AWS provides an official Pandas layer, but:
- wrong version breaks everything
- DataFrame-to-CSV must go through
StringIO() - Pandas is heavy and slow on small Lambdas
Lesson:
Lambda with Pandas = keep transformations focused and optimized.
4.4 Moving Processed Files
Never delete before copying.
S3 eventual consistency can cause data loss.
Correct order:
- Copy → processed
- Delete → to_processed
Lesson:
Cloud storage is eventually consistent. Build defensively.
4.5 Glue Crawler Schema Drift
Every JSON file was slightly different → Glue created:
- nested structs
- dynamic arrays
- missing columns
Fix:
- restrict crawler
- push only clean CSVs
- partition by date
Lesson:
Crawlers are powerful, but they need strict input schemas.
🧠 5. The Lessons That Actually Matter
These are the learnings that will stay with me for life.
5.1 ETL Pipelines Are Not About Code — They’re About Flow
The real game is:
- data ingestion
- schema evolution
- metadata management
- event triggers
- idempotent loads
- retry logic
The code is the smallest part.
5.2 Real-Time Systems Require Discipline
You can’t play loose with:
- latency
- message formats
- consumer offsets
- ordering guarantees
- schema versioning
Real-time systems punish bad assumptions.
5.3 Data Storage Strategy = Success or Failure
Across all three projects, storage design was crucial:
- S3 (Bronze → Silver → Gold)
- PostgreSQL with indexes
- Kafka partitions
- Athena external tables
Storage dictates flexibility.
5.4 Visualizations Are Only as Good as the Data Behind Them
From Streamlit to Athena:
- Charts break with missing data
- Forecasts fail with gaps
- Dashboards freeze with large payloads
Data quality + caching = stable dashboards.
5.5 IAM Permissions Will Eat Your Time
Every AWS project eventually hits:
- AccessDenied
- Missing S3 PutObject rights
- Lambda not allowed to invoke
- Crawler missing access
IAM is the silent boss of cloud engineering.
5.6 API Reliability Cannot Be Assumed
YouTube API broke.
Chicago API changed schema.
Spotify API rate-limited.
The only way to survive:
- retries
- backoff
- validation
- fallback logic
Resilience is a skill.
5.7 ML Models Are Just One Piece
Everyone loves the ML part.
But real-world ML uses:
- preprocessing
- feature validation
- model caching
- lightweight deployment
- latency control
Most of ML engineering is systems architecture.
🏁 6. Conclusion — These Projects Built My Foundation
Across these three builds, I learned more practical data engineering than any tutorial could teach:
- How ingestion pipelines break
- How real-time data behaves
- How event-driven systems misfire
- How storage decisions impact everything
- How ML fits into a real system
- How fragile APIs really are
- How important schema management is
- How to debug Kafka, Lambda, and SQL in the real world
Most importantly:
I learned how data actually flows in production.
These projects gave me the muscle memory to build pipelines confidently — not because everything worked smoothly, but because things broke and I had to fix them.
And that’s the real foundation of data engineering.
🔥 Next in Series
“The Future of Data Engineering: Lakehouse, AI + DE Fusion”
A deep dive into how data engineering is evolving with:
- AI-driven pipeline optimization
- Unified lakehouse architectures
- Intelligent ETL/ELT automation
- Real-time + batch fusion
- ML-native data platforms
🔔 Follow for More
If you found this helpful, follow TheDataForge for your daily Spark, Databricks in Data Engineering ,Machine Learning and real-world data engineering content⚡
Let’s connect — I post daily Big Data & Spark insights at DataForgeX on X.
👉 If you want the full code, architecture diagrams, or want help building similar real-time pipelines, follow me — I share practical DE deep-dives every day.
💬 Comment below:Which lesson resonated the most with you from these projects — ingestion challenges, real-time Kafka pipelines, Lambda automation, or ML integration?
🏷️ Tags
#DataEngineering #Streaming #Kafka #AWS #Spark #MachineLearning #ETL #YouTubeAPI #Athena #Glue #PostgreSQL #RealTimeData #SpotifyAPI #BigData