[{"data":1,"prerenderedAt":77},["ShallowReactive",2],{"pattern-lambda-durable-function-chaining-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":36,"level":37,"meta":38,"patternArch":39,"resources":56,"s3URL":6,"services":6,"stem":67,"testing":68,"videoId":6,"__hash__":76},"patterns\u002Fpatterns\u002Flambda-durable-function-chaining-sam.json","Function chaining with AWS Lambda durable functions",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>",[11,12],"content\u002Fcontributors\u002Fsahil-bhimjiani.json","content\u002Fcontributors\u002Fanup-rajpara.json",{"text":14},[15,16],"sam build","sam deploy --guided","Demonstrates the function chaining pattern using Lambda durable functions with automatic checkpointing and fault-tolerant sequential execution","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-function-chaining-sam","serverless-patterns\u002Flambda-durable-function-chaining-sam","lambda-durable-function-chaining-sam","template.yaml",{"headline":27,"text":28},"How it works",[29,30,31,32,33,34,35],"This pattern demonstrates the function chaining pattern using Lambda durable functions.","A durable orchestrator function chains three Lambda functions sequentially using context.invoke().","Each invocation creates an automatic checkpoint, enabling the workflow to resume from the last successful step after failures.","Step 1 (Add) initializes data and adds 10 to the input value.","Step 2 (Transform) doubles the value and transforms the name to uppercase.","Step 3 (Finalize) adds 5 to the value and sets the completion status.","The pattern showcases fault-tolerant workflow orchestration without managing state infrastructure.","Python","200",{},{"icon1":40,"icon2":45,"icon3":48,"line1":50,"line2":54},{"x":41,"y":42,"service":43,"label":44},25,50,"lambda","AWS Lambda durable functions",{"x":46,"y":41,"service":43,"label":47},80,"AWS Lambda",{"x":46,"y":49,"service":43,"label":47},65,{"from":51,"to":52,"label":53},"icon1","icon2","",{"from":51,"to":55,"label":53},"icon3",{"bullets":57},[58,61,64],{"text":59,"link":60},"Lambda durable functions Documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fdurable-functions.html",{"text":62,"link":63},"Durable Execution SDK for Python","https:\u002F\u002Fgithub.com\u002Faws\u002Faws-durable-execution-sdk-python",{"text":65,"link":66},"AWS Blog: Build multi-step applications with Lambda durable functions","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Faws\u002Fbuild-multi-step-applications-and-ai-workflows-with-aws-lambda-durable-functions\u002F","patterns\u002Flambda-durable-function-chaining-sam",{"text":69},[70,71,72,73,74,75],"Get the orchestrator alias ARN from stack outputs:","\u003Ccode>DURABLE_FUNCTION_ARN=$(aws cloudformation describe-stacks --stack-name durable-function-chaining --query 'Stacks[0].Outputs[?OutputKey==`OrchestratorAliasArn`].OutputValue' --output text)\u003C\u002Fcode>","Invoke the workflow:","\u003Ccode>aws lambda invoke --function-name \"$DURABLE_FUNCTION_ARN\" --payload '{\"id\": \"test-123\", \"name\": \"demo\", \"value\": 5}' --cli-binary-format raw-in-base64-out response.json\u003C\u002Fcode>","\u003Ccode>cat response.json\u003C\u002Fcode>","Expected output shows value transformation: 5 → +10 (step1) → ×2 (step2) → +5 (step3) = 35","VOmUCf1E_quk8r5a2F9HrNGzVrKD7cUcVmf5-xWI6qM",1778846885973]