The challenge
Orders arrived from a web store, marketplaces and wholesale channels, and stock levels were reconciled by hand. Overselling during promotions was a regular, costly headache.
Our solution
We designed an event-driven platform where every order, return and stock movement is an event. Lambda functions process events from EventBridge and SQS, and DynamoDB holds the real-time inventory ledger.
An API Gateway layer gives sales channels a single, consistent way to reserve and confirm stock.
- Idempotent event handlers and dead-letter queues
- Conditional writes in DynamoDB to prevent overselling
- Pay-per-use cost model that scales with order volume
- Dashboards and alerts for failed or delayed events
Architecture
Channels
- Web store
- Marketplaces
API
- API Gateway
- Lambda
Events
- EventBridge
- SQS + DLQ
Data
- DynamoDB
- S3 archive
Technology
- AWS Lambda
- API Gateway
- EventBridge
- SQS
- DynamoDB
- TypeScript
- AWS CDK
- CloudWatch
Outcomes
- Stock levels stay consistent across channels in near real time
- Promotional peaks handled without manual intervention
- Infrastructure costs scale with sales rather than sitting idle