[{"data":1,"prerenderedAt":80},["ShallowReactive",2],{"pattern-cdk-sfn-dmap-df":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":19,"extension":20,"framework":21,"gitHub":22,"highlight":6,"introBox":28,"language":35,"level":36,"meta":37,"patternArch":38,"resources":61,"s3URL":6,"services":6,"stem":72,"testing":73,"videoId":6,"__hash__":79},"patterns\u002Fpatterns\u002Fcdk-sfn-dmap-df.json","AWS Step Functions Distributed Map with AWS Lambda durable functions",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fmarco-jahn.json",{"text":13},[14,15,16,17,18],"Clone the repository: \u003Ccode>git clone https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u003C\u002Fcode>","Change directory: \u003Ccode>cd cdk-sfn-dmap-df\u003C\u002Fcode>","Install dependencies: \u003Ccode>npm install\u003C\u002Fcode>","Run tests: \u003Ccode>npm test\u003C\u002Fcode>","Deploy the CDK stack: \u003Ccode>cdk deploy\u003C\u002Fcode>","Fan out across Amazon S3 items using Distributed Map, invoking a Lambda durable function per item with per-item idempotency.","json","AWS CDK",{"template":23},{"repoURL":24,"templateURL":25,"projectFolder":26,"templateFile":27},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fcdk-sfn-dmap-df","serverless-patterns\u002Fcdk-sfn-dmap-df","cdk-sfn-dmap-df","lib\u002Fcdk-sfn-dmap-df-stack.ts",{"headline":29,"text":30},"How it works",[31,32,33,34],"This pattern uses AWS Step Functions Distributed Map to read items from an Amazon S3 JSON file and fan out processing across Lambda durable functions.","Each item is processed by a durable function invoked via the AWS SDK service integration (CallAwsService targeting lambda:invoke).","The DurableExecutionName parameter is derived from each item's ID, providing per-item idempotency across re-runs.","The durable function executes a three-step workflow: validate the item, wait for rate limiting, and update the catalog entry.","TypeScript","300",{},{"icon1":39,"icon2":44,"icon3":48,"icon4":52,"line1":54,"line2":57,"line3":59},{"x":40,"y":41,"service":42,"label":43},10,50,"s3","Amazon S3",{"x":45,"y":41,"service":46,"label":47},30,"sfn","AWS Step Functions",{"x":49,"y":41,"service":50,"label":51},60,"lambda","AWS Lambda durable function",{"x":53,"y":41,"service":42,"label":43},90,{"from":55,"to":56},"icon1","icon2",{"from":56,"to":58},"icon3",{"from":58,"to":60},"icon4",{"bullets":62},[63,66,69],{"text":64,"link":65},"AWS Step Functions Distributed Map","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconcepts-asl-use-map-state-distributed.html",{"text":67,"link":68},"Lambda durable functions Documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fdurable-functions.html",{"text":70,"link":71},"AWS SDK Service Integration for Step Functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fsupported-services-awssdk.html","patterns\u002Fcdk-sfn-dmap-df",{"text":74},[75,76,77,78],"Run local tests: \u003Ccode>npm test\u003C\u002Fcode> — validates CDK stack assertions and runs the durable function locally using LocalDurableTestRunner (no AWS deployment needed).","Start the state machine: \u003Ccode>aws stepfunctions start-execution --state-machine-arn &lt;StateMachineArn from stack output&gt; --name \"catalog-update-$(date +%s)\"\u003C\u002Fcode>","Monitor the execution in the AWS Step Functions console to see all 50 child executions.","Re-run with the same input to demonstrate idempotency — durable functions return cached results.","9ByjljnhVkPvN5GyBrmwqCzysP672LI-s15z07FtU1s",1782210915107]