[{"data":1,"prerenderedAt":62},["ShallowReactive",2],{"pattern-lambda-durable-parallel-execution-python-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":13,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":35,"level":36,"meta":37,"patternArch":38,"resources":43,"s3URL":6,"services":6,"stem":57,"testing":58,"videoId":6,"__hash__":61},"patterns\u002Fpatterns\u002Flambda-durable-parallel-execution-python-sam.json","Parallel execution of operations with AWS Lambda durable functions",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11,12],"content\u002Fcontributors\u002Fanup-rajpara.json","content\u002Fcontributors\u002Fsahil-bhimjiani.json",{"text":14},[15,16],"sam build","sam deploy --guided","Demonstrates parallel execution of operations using Lambda durable functions with batch result collection and error handling","json","AWS SAM",{"template":21},{"repoURL":22,"templateURL":23,"projectFolder":24,"templateFile":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-durable-parallel-execution-python-sam","serverless-patterns\u002Flambda-durable-parallel-execution-python-sam","lambda-durable-parallel-execution-python-sam","template.yaml",{"headline":27,"text":28},"How it works",[29,30,31,32,33,34],"This pattern demonstrates parallel execution capabilities of AWS Lambda durable functions by performing four mathematical operations concurrently.","The workflow uses context.parallel() to execute addition, subtraction, multiplication, and division operations simultaneously on two input numbers.","Each operation is defined as a separate step with its own logging and error handling, showcasing the durable execution model.","The division operation uses a custom retry strategy (RetryPresets.none()) to prevent retries on division by zero errors.","Results from all parallel operations are collected using BatchResult, which tracks both successful results and failure counts.","If any operation fails, the workflow returns an error response; otherwise, it returns all calculation results in a structured JSON format.","Python","200",{},{"icon1":39},{"x":40,"y":40,"service":41,"label":42},50,"lambda","AWS Lambda durable functions",{"bullets":44},[45,48,51,54],{"text":46,"link":47},"AWS Lambda durable functions documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fdurable-functions.html",{"text":49,"link":50},"Durable Execution SDK for Python","https:\u002F\u002Fgithub.com\u002Faws\u002Faws-durable-execution-sdk-python",{"text":52,"link":53},"Parallel Execution","https:\u002F\u002Fgithub.com\u002Faws\u002Faws-durable-execution-sdk-python\u002Fblob\u002Fmain\u002Fdocs\u002Fcore\u002Fparallel.md",{"text":55,"link":56},"Retry Strategies","https:\u002F\u002Fgithub.com\u002Faws\u002Faws-durable-execution-sdk-python\u002Fblob\u002Fmain\u002Fdocs\u002Fadvanced\u002Ferror-handling.md#retry-strategies","patterns\u002Flambda-durable-parallel-execution-python-sam",{"text":59},[60],"See the GitHub repo for detailed testing instructions.","Ll1iEOg5dQIQ_v-EdEe4zWWFm9QTsHdgeskD43Br7nY",1778846886047]