[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"workflow-distributed-batch-import":3},{"id":4,"title":5,"cleanup":6,"contributors":11,"deploy":13,"description":16,"diagram":17,"extension":18,"framework":19,"gitHub":20,"introBox":30,"level":34,"meta":35,"resources":36,"s3URL":51,"services":52,"simplicity":57,"stem":58,"testing":59,"type":64,"usecase":65,"videoId":66,"__hash__":67},"workflows\u002Fworkflows\u002Fdistributed-batch-import.json","Distributed Batch Import",{"headline":7,"text":8},"Cleanup",[9,10],"1. Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.","2. Delete the S3 bucket: \u003Ccode>aws s3 rb s3:\u002F\u002F{stack-name}-incoming-files --force\u003C\u002Fcode>.",[12],"content\u002Fcontributors\u002Fstefan-karlsson.json",{"text":14},[15],"sam deploy --guided","Reads a JSON file from S3 and saves its contents in batches to a DynamoDB table.","\u002Fassets\u002Fimages\u002Fworkflows\u002Fdistributed-batch-import.png","json","AWS SAM",{"template":21,"payloads":26},{"repoURL":22,"templateDir":23,"templateFile":24,"ASL":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fdistributed-batch-import\u002F","distributed-batch-import","template.yaml","state-machine\u002Fcreate-organization.asl.yaml",[27],{"headline":28,"payloadURL":29},"organization-import.json","https:\u002F\u002Fraw.githubusercontent.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Fmain\u002Fdistributed-batch-import\u002Fresources\u002Forganization-import.json",{"headline":31,"text":32},"How it works",[33],"When a .JSON file, prefixed with 'create\u002F', is stored in an Amazon S3 bucket, an event indicating the file's creation is dispatched to Amazon EventBridge's default bus. The workflow reads the content of the object, which is expected to be an array in batches of 10. Each batch is processed in parallel by creating its own state machine in Express mode. These batches can be mapped to the desired format before each object is stored in Amazon DynamoDB","200",{},{"headline":37,"bullets":38},"Additional resources",[39,42,45,48],{"text":40,"link":41},"Intrinsic functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Famazon-states-language-intrinsic-functions.html",{"text":43,"link":44},"Amazon S3 Event Notifications","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002FNotificationHowTo.html",{"text":46,"link":47},"What is Amazon DynamoDB?","https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002Fdeveloperguide\u002FIntroduction.html",{"text":49,"link":50},"DynamoDB BatchWriteItem","https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002FAPIReference\u002FAPI_BatchWriteItem.html",null,[53,54,55,56],"s3","sfn","dynamodb","eventbridge","1 - Fundamental","workflows\u002Fdistributed-batch-import",{"headline":60,"text":61},"Testing",[62,63],"1. Create a new folder called 'create' in the S3 bucket named '{STACK_NAME}-incoming-files'.","2. Upload the '.\u002Fresource\u002Forganization-import.json' file to the S3 bucket to trigger the state machine.","Standard","Data Processing","","OnMm6EQdyuViQImEYUkM71Yr9UCM7vd7f3t7XodoBK8",1778846888979]