Skip to main content
Dhristhi
← Back to case studies

Case Study

Replacing Batch Processing with Serverless Event-Driven Architecture for a Logistics Company

A national logistics provider processing millions of daily shipment events was running on an aging batch-processing monolith. Order tracking updates were hours behind reality, partner integrations required manual coordination, and the EC2 fleet running the system cost more to maintain than the busin

ClientNational Logistics & Supply Chain Provider
IndustryLogistics & Supply Chain
Duration14 weeks
Team5 engineers + 1 cloud architect
Results

Measurable impact delivered.

Hours → secondsProcessing latency
-70%Infrastructure cost
4.2M+Daily events processed
Zero (serverless)Ops overhead
12 connectedPartner integrations
Multiple dailyDeployment frequency

A national logistics provider processing millions of daily shipment events was running on an aging batch-processing monolith. Order tracking updates were hours behind reality, partner integrations required manual coordination, and the EC2 fleet running the system cost more to maintain than the business value it delivered. We replaced it with a fully serverless event-driven architecture on AWS that processes 4.2M+ daily events in real-time, cut infrastructure cost by 70%, and eliminated operational overhead entirely.

The Challenge

The company's core order tracking system ran as a monolithic Java application on a fleet of 24 EC2 instances. Shipment events from warehouses, carriers, and delivery partners arrived via FTP drops and scheduled API polling — then processed in 15-minute batch cycles. This meant customers saw tracking updates hours after events actually occurred. The batch architecture created cascading delays: if one batch failed, subsequent batches backed up, sometimes causing full-day gaps in tracking visibility. Partner onboarding took 6–8 weeks because each integration was hand-coded. The ops team spent 30+ hours per week managing the EC2 fleet, patching servers, scaling for peak periods, and recovering from batch failures. Infrastructure costs were $45K/month regardless of actual load.

Our Approach

Event Architecture Design — Weeks 1–3

Mapped all event sources (warehouses, carriers, partners, internal systems), defined event schemas, and designed a serverless event-driven architecture using EventBridge as the central bus with Lambda consumers.

  • Event source inventory across 12 partners and 4 internal systems
  • Event schema design with versioning strategy
  • EventBridge event bus topology with routing rules
  • Dead letter queue and retry strategy for fault tolerance
  • Cost modeling vs. existing EC2 fleet

Core Event Pipeline — Weeks 4–8

Built the serverless processing pipeline: EventBridge for routing, Lambda for processing, DynamoDB for state, and SQS for buffering high-volume bursts. Implemented idempotent processing for exactly-once semantics.

  • EventBridge rules routing events to domain-specific Lambda consumers
  • Lambda functions for event validation, enrichment, and state updates
  • DynamoDB single-table design for order state with sub-millisecond reads
  • SQS buffering for burst protection during peak shipping periods
  • Step Functions for multi-step workflows (customs clearance, exception handling)
  • Idempotent processing with deduplication keys

Partner Integration Layer — Weeks 9–11

Built a standardized partner integration framework using API Gateway and EventBridge — allowing new partners to connect via webhook or API with self-service onboarding instead of custom development.

  • API Gateway endpoints for partner webhook ingestion
  • Event schema validation and transformation per partner format
  • Self-service partner onboarding portal with API key management
  • Real-time event delivery to partners via WebSocket and webhook push
  • Partner health monitoring and automatic retry on delivery failure

Migration, Testing & Cutover — Weeks 12–14

Ran the new system in parallel with the batch monolith, validated event-by-event correctness, then cut over with zero downtime using traffic shifting.

  • Shadow mode: new pipeline processes all events alongside legacy system
  • Event-by-event comparison for correctness validation
  • Gradual traffic shift from batch to real-time over 5 days
  • Legacy system decommissioned after 2-week stabilization period
  • CloudWatch dashboards for real-time operational visibility

Outcomes

Real-Time Processing

Tracking updates now appear within seconds of the event occurring — down from hours in the batch system. Customers see live shipment progress, and customer service teams have real-time visibility.

Cost Elimination

Infrastructure cost dropped from $45K/month to $13K/month — a 70% reduction. The serverless model scales to zero during off-peak hours and handles 10× burst capacity without pre-provisioning.

Zero Operations

The 24-server EC2 fleet and 30+ hours/week of ops maintenance was eliminated entirely. The team has no servers to patch, no capacity to plan, and no batch failures to recover from.

Partner Velocity

New partner integrations dropped from 6–8 weeks of custom development to 3–5 days of configuration. The standardized integration framework now connects 12 partners with self-service onboarding.

Technology Stack

Tools and platforms used.

AWSLambdaEventBridgeSQSDynamoDBAPI GatewayStep FunctionsTerraformCloudWatchPython

Get Started

Ready to transform your developer experience?

See how a Backstage-based platform can deliver measurable results for your engineering team.

Start Your Assessment