[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-lambda-durable-functions-nodejs-calling-ecs":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":32,"level":33,"meta":34,"patternArch":35,"resources":49,"s3URL":6,"services":6,"stem":63,"testing":64,"videoId":6,"__hash__":67},"patterns\u002Fpatterns\u002Flambda-durable-functions-nodejs-calling-ecs.json","AWS Lambda durable functions in NodeJS calling Amazon ECS",null,{"text":8},[9],"\u003Ccode>sam delete\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fsurya-sai-d.json",{"text":13},[14,15],"sam build","sam deploy --guided","Orchestrate long-running ECS Fargate tasks using Lambda durable functions with callback pattern","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-functions-nodejs-calling-ecs","serverless-patterns\u002Flambda-durable-functions-nodejs-calling-ecs","lambda-durable-functions-nodejs-calling-ecs","template.yaml",{"headline":26,"text":27},"How it works",[28,29,30,31],"This pattern demonstrates how to use AWS Lambda durable functions to orchestrate Amazon ECS Fargate tasks that can run for up to 24 hours.","The Lambda function creates a callback ID, starts an ECS task with that ID, and then automatically suspends execution without incurring compute charges during the wait period.","When the ECS task completes, it calls the Lambda SendDurableExecutionCallbackSuccess API to resume the durable function and return results.","This pattern is ideal for long-running batch jobs, data processing, ML training, or any workload that exceeds Lambda's 15-minute timeout.","Node.js","200",{},{"icon1":36,"icon2":41,"line1":45},{"x":37,"y":38,"service":39,"label":40},20,50,"lambda","AWS Lambda durable functions",{"x":42,"y":38,"service":43,"label":44},80,"ecs","Amazon ESC task",{"from":46,"to":47,"label":48},"icon1","icon2","wait for callback",{"bullets":50},[51,54,57,60],{"text":52,"link":53},"AWS Lambda durable functions Documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fdurable-functions.html",{"text":55,"link":56},"Amazon ECS on AWS Fargate","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonECS\u002Flatest\u002Fdeveloperguide\u002FAWS_Fargate.html",{"text":58,"link":59},"Lambda Durable Execution SDK for JavaScript","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@aws\u002Fdurable-execution-sdk-js",{"text":61,"link":62},"SendDurableExecutionCallbackSuccess API","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fapi\u002FAPI_SendDurableExecutionCallbackSuccess.html","patterns\u002Flambda-durable-functions-nodejs-calling-ecs",{"text":65},[66],"See the GitHub repo for detailed testing instructions.","dByvg8fQx-eo_AEfgwWfy0UmID9Z893NYwxLYUHuIA8",1778846885997]