[{"data":1,"prerenderedAt":75},["ShallowReactive",2],{"pattern-apigw-rest-stepfunctions-express-sync-bedrock-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":34,"level":35,"meta":36,"patternArch":37,"resources":57,"s3URL":6,"services":6,"stem":70,"testing":71,"videoId":6,"__hash__":74},"patterns\u002Fpatterns\u002Fapigw-rest-stepfunctions-express-sync-bedrock-sam.json","Prompt chaining with Amazon API Gateway and AWS Step Functions",null,{"text":8},[9],"\u003Ccode>sam delete\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fmike-hume.json",{"text":13},[14],"sam deploy","Prompt chaining no-code example with Amazon API Gateway HTTP API, AWS Step Functions and Amazon Bedrock.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-rest-stepfunctions-express-sync-bedrock-sam","serverless-patterns\u002Fapigw-rest-stepfunctions-express-sync-bedrock-sam","apigw-rest-stepfunctions-express-sync-bedrock-sam","template.yml",{"headline":25,"text":26},"How it works",[27,28,29,30,31,32,33],"The provided example demonstrates the deployment of a serverless application using the AWS Serverless Application Model (SAM) template.","This serverless application includes an Amazon API Gateway HTTP API endpoint that is connected to an AWS Step Functions state machine.","The state machine is designed to invoke an Express workflow synchronously.","It utilizes AWS Step Functions' intrinsic functions to chain two prompts, which are then used to invoke the Amazon Bedrock language model.","The output from the state machine execution is returned to the client within 29 seconds through the HTTP API.","This no-code example showcases how the results from the first prompt can be used to provide context for the second prompt, allowing the language model to deliver a highly-curated response.","By chaining these prompts, the system can leverage the capabilities of the language model to generate more meaningful and contextual outputs.","Integration","200",{},{"icon1":38,"icon2":43,"icon3":47,"line1":51,"line2":55},{"x":39,"y":40,"service":41,"label":42},20,50,"apigw","Amazon API Gateway HTTP API",{"x":44,"y":40,"service":45,"label":46},55,"sfn","AWS Step Functions",{"x":48,"y":40,"service":49,"label":50},80,"bedrock","Amazon Bedrock",{"from":52,"to":53,"label":54},"icon1","icon2","",{"from":53,"to":56,"label":54},"icon3",{"bullets":58},[59,62,64,67],{"text":60,"link":61},"Amazon API Gateway","https:\u002F\u002Faws.amazon.com\u002Fapi-gateway\u002F",{"text":50,"link":63},"https:\u002F\u002Faws.amazon.com\u002Fbedrock\u002F",{"text":65,"link":66},"AWS Step Functions Intrinsic functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Famazon-states-language-intrinsic-functions.html",{"text":68,"link":69},"Synchronous and Asynchronous Express Workflows","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconcepts-express-synchronous.html","patterns\u002Fapigw-rest-stepfunctions-express-sync-bedrock-sam",{"text":72},[73],"See the GitHub repo for detailed testing instructions.","iVJEqDojdcBSbXA5Xodgngr4iKV2osAvkaRty8avCU8",1781087766799]