Parallel Processing with AWS Lambda durable functions

Durable function → Inventory Check → Shipping Calculation → Payment Validation → Tax Calculation

Parallel order processing using Lambda durable functions with concurrent inventory, payment, shipping, and tax validation

This pattern demonstrates parallel processing using Lambda durable functions to execute multiple independent operations concurrently.
The workflow validates orders by running four worker functions in parallel: inventory check, payment validation, shipping calculation, and tax calculation.
Parallel execution reduces total processing time from ~575ms (sequential) to ~200ms (parallel), achieving a 2.9x speedup.
Each parallel task is automatically checkpointed, allowing the workflow to survive interruptions and resume from the last successful step.
The pattern uses a five-function architecture: one durable orchestrator and four non-durable worker functions.
All validation results are aggregated and validated before calculating final order totals and confirming the order.

< 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-parallel-processing-sam

Deploy

Note: Lambda durable functions are available in multiple AWS regions.cd src/orchestrator && npm install && cd ../..sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Sasidharan Ramasamy

Sasidharan Ramasamy

Technical Account Manager @ AWS with over 10 years of industry experience

Follow on LinkedIn