[{"data":1,"prerenderedAt":60},["ShallowReactive",2],{"workflow-distributed-map-state":3},{"id":4,"title":5,"cleanup":6,"contributors":10,"deploy":12,"description":17,"diagram":18,"extension":19,"framework":20,"gitHub":21,"introBox":30,"level":37,"meta":38,"resources":39,"s3URL":48,"services":49,"simplicity":51,"stem":52,"testing":53,"type":57,"usecase":58,"videoId":29,"__hash__":59},"workflows\u002Fworkflows\u002Fdistributed-map-state.json","Distributed map state gif generator",{"headline":7,"text":8},"Cleanup",[9],"1. Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fbenjamin-smith.json",{"text":13},[14,15,16],"1. First deploy the Fmpeg layer","2. sam build","3. sam deploy --guided","Convert .mp4 and .mov files from S3 into multiple Gif animations for timeline scrubbing.","\u002Fassets\u002Fimages\u002Fworkflows\u002Fdistributed-map-state.png","json","AWS SAM",{"template":22,"payloads":27},{"repoURL":23,"templateDir":24,"templateFile":25,"ASL":26},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fdistributed-map-state-gif-generator\u002F\u002F","distributed-map-state-gif-generator\u002F","template.yaml","statemachine\u002Fworkflow.asl.json",[28],{"headline":29,"payloadURL":29},"",{"headline":31,"text":32},"Activity State Machine",[33,34,35,36],"This application creates a Step Functions workflow with a distributed Map State that runs when a new movie file is uploaded to an S3 bucket. The Workflow runs multiple Lambda functions concurrently, each invocation is responsible for generating it's own .gif clip. A 1 hour movie takes about 4 seconds to generate 120 gifs.","the first Lambda function uses ffmpeg to work out how long the video is and how many chunks (gifs) will be needed for the whole video. The chunks are loaded into a MAP state. The next Lambda uses ffmpeg to build the .gifs.","Use the timeline scrubber applicaiton (link in resources section) to view the gif animation.","\u003Cstrong>First, deploy this \u003Ca targer=_blank href='https:\u002F\u002Fserverlessrepo.aws.amazon.com\u002F#!\u002Fapplications\u002Fus-east-1\u002F145266761615\u002Fffmpeg-lambda-layer'>fmpeg Lambda layer\u003C\u002Fa>.\u003C\u002Fstrong>","100",{},{"headline":40,"bullets":41},"Additional resources",[42,45],{"text":43,"link":44},"Step Functions Map State","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Famazon-states-language-map-state.html",{"text":46,"link":47},"Deploy application front-end","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fdistributed-map-state\u002Ffrontend","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fworkflows\u002Fdistributed-map-state\u002Fcloudformation.yml",[50],"lambda","3 - Application","workflows\u002Fdistributed-map-state",{"headline":54,"text":55},"Testing",[56],"See the GitHub repo for detailed testing instructions.","Standard","Data Processing","TjFZrNRawpO6HVZ6ZqBCyX70rKLNKqrWDQIS_SViKbI",1781865345085]