Real-time inventory management

This sample inventory management microservice demonstrates how to manage inventory levels by reserving inventory when a new order is received, alerts on low stock, and triggers purchase orders to replenish inventory

The sample inventory management microservice includes an EventBridge Schedule triggering a Lambda function to generate sample order data. An EventBridge rule persists the data in an SQS queue. A reserve-stock Lambda function starts a workflow, checking product availability in DynamoDB and creating purchase orders if needed. The create-purchase-order workflow sends purchase order emails and updates stock levels. The check-inventory-level workflow monitors stock levels via DynamoDB Streams, creating purchase orders for low inventory and updating product status as necessary. This microservice efficiently manages inventory, handles orders, and ensures products are in stock.

< Back to all workflows

GitHub icon View this workflow on GitHub


Clone repo

git clone https://github.com/aws-samples/step-functions-workflows-collection/tree/main/inventory-management-sam/cd step-functions-workflows-collection/inventory-management-sam

Deploy

sam buildsam deploy --guided


Testing

Please see the github repo README for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete.

Additional resources

Created by:

Shannon Colavita

Shannon Colavita

Senior Solutions Architect at AWS

Follow on LinkedIn