[{"data":1,"prerenderedAt":59},["ShallowReactive",2],{"workflow-dynamic-rest-api":3},{"id":4,"title":5,"cleanup":6,"contributors":10,"deploy":12,"description":15,"diagram":16,"extension":17,"framework":18,"gitHub":19,"introBox":28,"level":34,"meta":35,"resources":36,"s3URL":45,"services":46,"simplicity":50,"stem":51,"testing":52,"type":56,"usecase":57,"videoId":27,"__hash__":58},"workflows\u002Fworkflows\u002Fdynamic-rest-api.json","Dynamic REST API",{"headline":7,"text":8},"Cleanup",[9],"1. Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fasma-hemmati.json",{"text":13},[14],"cdk deploy","REST API Gateway asynchronously integrates with Express Step Functionsand put\u002Fget\u002Fdelete items from a DynamoDB table","\u002Fassets\u002Fimages\u002Fworkflows\u002Fdynamic-rest-api.png","json","AWS CDK",{"template":20,"payloads":25},{"repoURL":21,"templateDir":22,"templateFile":23,"ASL":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fdynamic-rest-api\u002F","dynamic_rest_api","dynamic_rest_api\u002Fdynamic_rest_api.py","statemachine\u002Fstatemachine.asl.json",[26],{"headline":27,"payloadURL":27},"",{"headline":29,"text":30},"How it works",[31,32,33],"Amazon API Gateway integrate with AWS Step Functions as the backend, specifically Synchronous Express Workflows. Synchronous Express Workflows start a workflow and wait until it completes, then return the result.This workflow implements integrating a REST API with a Synchronous Express State machine that calls DynamoDB APIs to either store, retrieve or delete an Item from a table.","Invoking the endpoint with GET, POST, DELETE HTTP methods (any HTTP method can be set), will send the request to the state machine as a new execution. State machine make a choice based on input`’s “http Method” and calls one of DynamoDB PutItem, GetItem or DeleteItem APIs accordingly.","On success, an HTTP code 200 is returned with the execution output as the Response Body. The response from the invocation contains only the output field from the StartSyncExecution API. In case of failures, the fields error and cause are returned as part of the response.","100",{},{"headline":37,"bullets":38},"Additional resources",[39,42],{"text":40,"link":41},"The AWS Step Functions Workshop","https:\u002F\u002Fcatalog.workshops.aws\u002Fstepfunctions\u002Fen-US",{"text":43,"link":44},"Try the new interactive Step Functions workshop.","https:\u002F\u002Fcatalog.workshops.aws\u002Fstepfunctions\u002Fen-US\u002F",null,[47,48,49],"sfn","apigw","dynamodb","2 - Pattern","workflows\u002Fdynamic-rest-api",{"headline":53,"text":54},"Testing",[55],"See the GitHub repo for detailed testing instructions.","Express","APIs","E5yv3rx_C7noOdgyzNUeAAo7QlwjYnTH2lXpZKylPSc",1782229685326]