[{"data":1,"prerenderedAt":55},["ShallowReactive",2],{"workflow-batch-write-to-dynamodb":3},{"id":4,"title":5,"cleanup":6,"contributors":10,"deploy":12,"description":15,"diagram":16,"extension":17,"framework":18,"gitHub":19,"introBox":28,"level":33,"meta":34,"resources":35,"s3URL":41,"services":42,"simplicity":46,"stem":47,"testing":48,"type":52,"usecase":53,"videoId":27,"__hash__":54},"workflows\u002Fworkflows\u002Fbatch-write-to-dynamodb.json","Batch write data to DynamoDB",{"headline":7,"text":8},"Cleanup",[9],"1. Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fudit-parikh.json",{"text":13},[14],"sam deploy -g","Transform and batch data to a DynamoDB table","\u002Fassets\u002Fimages\u002Fworkflows\u002Fbatch-write-to-dynamodb.png","json","AWS SAM",{"template":20,"payloads":25},{"repoURL":21,"templateDir":22,"templateFile":23,"ASL":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fsfn-dynamodb-batchwriteitem\u002F","sfn-dynamodb-batchwriteitem","template.yaml","statemachine\u002Fstatemachine.asl.json",[26],{"headline":27,"payloadURL":27},"",{"headline":29,"text":30},"How it works",[31,32],"In this project, a Step Functions state machine invokes a Lambda function to get data to be written to a DynamoDB Table. The Lambda function generates an array of JSON objects containing random sample data.","A Map state converts the JSON array to a BatchWriteItem compatible DynamoDB JSON Array. This data is then passed to a Distributed Map State which performs batching of 25 items. This batching is necessary to comply with the validation requirements of the BatchWriteItem API in DynamoDB.","100",{},{"headline":36,"bullets":37},"Additional resources",[38],{"text":39,"link":40},"DynamoDB BatchWriteItem API Reference","https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002FAPIReference\u002FAPI_BatchWriteItem.html",null,[43,44,45],"dynamodb","lambda","sfn","1 - Fundamental","workflows\u002Fbatch-write-to-dynamodb",{"headline":49,"text":50},"Testing",[51],"See the GitHub repo for detailed testing instructions.","Standard","Data Processing","yYLgEkPCZXbnUHz5ApKOQReK7yue5oRKwe-DGhlGA3s",1778846888790]