[{"data":1,"prerenderedAt":77},["ShallowReactive",2],{"pattern-lambda-durable-saga-python-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":25,"language":33,"level":34,"meta":35,"patternArch":36,"resources":58,"s3URL":6,"services":6,"stem":72,"testing":73,"videoId":6,"__hash__":76},"patterns\u002Fpatterns\u002Flambda-durable-saga-python-sam.json","Saga Pattern with AWS Lambda Durable Functions in Python",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fajaya-shrestha.json",{"text":13},[14,15],"sam build","sam deploy --guided","Multi-step order processing with automatic compensating transactions on failure using Lambda durable functions and Amazon DynamoDB.","json","AWS SAM",{"template":20},{"repoURL":21,"templateURL":22,"projectFolder":23,"templateFile":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-durable-saga-python-sam","serverless-patterns\u002Flambda-durable-saga-python-sam","lambda-durable-saga-python-sam","template.yaml",{"headline":26,"text":27},"How it works",[28,29,30,31,32],"This pattern implements the Saga pattern using AWS Lambda durable functions to orchestrate a multi-step order workflow.","Three checkpointed steps execute in sequence: reserve inventory, process payment, and confirm order.","If any step fails, compensating transactions automatically execute in reverse order to restore data consistency — cancelling payment and releasing inventory.","Each step uses @durable_step for automatic checkpointing. If interrupted, the function resumes from the last completed step without re-execution.","IAM permissions follow least privilege with DynamoDBCrudPolicy scoped to each specific table.","Python","300",{},{"icon1":37,"icon2":42,"icon3":46,"icon4":49,"line1":51,"line2":54,"line3":56},{"x":38,"y":39,"service":40,"label":41},20,50,"lambda","Lambda (Durable)",{"x":39,"y":43,"service":44,"label":45},15,"dynamodb","Orders Table",{"x":47,"y":39,"service":44,"label":48},70,"Payments Table",{"x":39,"y":47,"service":44,"label":50},"Inventory Table",{"from":52,"to":53},"icon1","icon2",{"from":52,"to":55},"icon3",{"from":52,"to":57},"icon4",{"bullets":59},[60,63,66,69],{"text":61,"link":62},"AWS Lambda durable functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fdurable-functions.html",{"text":64,"link":65},"Saga pattern — AWS Prescriptive Guidance","https:\u002F\u002Fdocs.aws.amazon.com\u002Fprescriptive-guidance\u002Flatest\u002Fmodernization-data-persistence\u002Fsaga-pattern.html",{"text":67,"link":68},"Durable Execution SDK for Python","https:\u002F\u002Fgithub.com\u002Faws\u002Faws-durable-execution-sdk-python",{"text":70,"link":71},"Building fault-tolerant applications with Lambda durable functions","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbuilding-fault-tolerant-long-running-application-with-aws-lambda-durable-functions","patterns\u002Flambda-durable-saga-python-sam",{"text":74},[75],"See the GitHub repo for detailed testing instructions.","YelEs3UEDyI_HFx41BzVlT7X95FncKAvauHHXL8FwgY",1785321312578]