Case study

AWS architecture for a live product data pipeline, from nightly batch to Kafka Streams

Millions of products, and a data pipeline that processed them once a night, when it didn't fail.

Industry
E-commerce
My role
Maintained the batch pipeline, built its streaming replacement with the team
Scale
Millions of products, processed continuously
Results
Reliability
A stable job that runs reliably

No more failed nightly runs or manual replays. The streaming pipeline processes each change on its own, inside private subnets with scoped security groups.

Revenue
More revenue from fresher data

Decisions are based on current data instead of yesterday's, so results are better and reach customers sooner.

The story

Every product in the catalogue needs to be processed and published based on business rules. For millions of products that ran as a nightly batch job. Step Functions orchestrated SNS, Lambdas, ECS jobs, EC2 and DynamoDB, written in Python and TypeScript and provisioned with Terraform.

I maintained that pipeline, and it failed often. It was a long chain of steps in one fixed window, so one broken step left the data stale until the next night.

With the team I rebuilt it as a Kafka Streams application on Amazon MSK, running on ECS inside private subnets. Changes now flow through Kafka and are processed as they happen, instead of once a night.

Before: A nightly batch, orchestrated end to end
The old architecture, which I also maintained.
After: Kafka Streams on Amazon MSK, processing live
The new architecture, built with the team.

Technology

Languages and tooling
Python
Python
data processing
TypeScript
TypeScript
services and tooling
Vue
Vue
internal tooling
Docker
Docker
containers
Terraform
Terraform
infrastructure as code
Streaming
Kafka Streams
Kafka Streams
live processing app
Amazon MSK
Amazon MSK
managed Kafka cluster
Amazon ECS
Amazon ECS
runs the streams app
Batch pipeline and platform
AWS Step Functions
AWS Step Functions
nightly orchestration
AWS Lambda, Amazon SNS
AWS Lambda, Amazon SNS
AWS Lambda, Amazon SNS
external data intake
Amazon EC2, ECS
Amazon EC2, ECS
Amazon EC2, ECS
processing workflow
Amazon DynamoDB, RDS
Amazon DynamoDB, RDS
Amazon DynamoDB, RDS
internal product data
Amazon VPC, IAM
Amazon VPC, IAM
Amazon VPC, IAM
networking, security groups, access
Amazon CloudWatch, Grafana
Amazon CloudWatch, Grafana
Amazon CloudWatch, Grafana
metrics and error reports
Core stack

Working on something similar?

Tell me what you run today and where it hurts. I will come back with how I would build it, and what I would leave alone.

Discuss your project