Order Processing with AWS Lambda durable functions

API Gateway REST API → AWS Lambda → Amazon DynamoDB

Order processing workflow using Lambda durable functions with automatic checkpointing, long-running waits, and state persistence

This pattern demonstrates an order processing workflow using Lambda durable functions.
The workflow includes validation, payment processing, fraud checks, credit checks (for high-value orders), inventory management, and shipping coordination.
Durable execution enables long-running waits (5 minutes for warehouse processing, 3 minutes for carrier pickup) without consuming compute resources.
Each step is automatically checkpointed, allowing the workflow to survive interruptions and resume from the last successful step.
The pattern uses a dual-function architecture: async durable function for order processing and sync non-durable function for real-time status queries.
Order state is persisted in Amazon DynamoDB with real-time status updates throughout the 17-step workflow.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-durable-order-processing-sam

Deploy

Note: Lambda durable functions are currently available in us-east-2 (Ohio) region only.cd src && npm install && cd ..sam buildsam deploy --guided --region us-east-2


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete --region us-east-2.

Created by:

Abhishek Agawane

Abhishek Agawane

I am a Cloud Support Engineer (Serverless) at AWS who loves cloud computing