[{"data":1,"prerenderedAt":73},["ShallowReactive",2],{"pattern-appsync-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":56,"s3URL":6,"services":6,"stem":68,"testing":69,"videoId":6,"__hash__":72},"patterns\u002Fpatterns\u002Fappsync-stepfunctions-express-sync-bedrock-sam.json","Prompt chaining with AWS AppSync, AWS Step Functions and Amazon Bedrock.",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 AWS AppSync, 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\u002Fappsync-stepfunctions-express-sync-bedrock-sam","serverless-patterns\u002Fappsync-stepfunctions-express-sync-bedrock-sam","appsync-stepfunctions-express-sync-bedrock-sam","template.yaml",{"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 AWS AppSync serverless GraphQL 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 GraphQL 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":46,"line1":50,"line2":54},{"x":39,"y":40,"service":41,"label":42},20,50,"appsync","AWS Appsync",{"x":40,"y":40,"service":44,"label":45},"sfn","AWS Step Functions",{"x":47,"y":40,"service":48,"label":49},80,"bedrock","Amazon Bedrock",{"from":51,"to":52,"label":53},"icon1","icon2","",{"from":52,"to":55,"label":53},"icon3",{"bullets":57},[58,61,63,65],{"text":59,"link":60},"AWS Step Functions intrinsic functions","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Famazon-states-language-intrinsic-functions.html",{"text":42,"link":62},"https:\u002F\u002Faws.amazon.com\u002Fpm\u002Fappsync\u002F",{"text":49,"link":64},"https:\u002F\u002Faws.amazon.com\u002Fbedrock\u002F",{"text":66,"link":67},"Synchronous and Asynchronous Express Workflows","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconcepts-express-synchronous.html","patterns\u002Fappsync-stepfunctions-express-sync-bedrock-sam",{"text":70},[71],"See the GitHub repo for detailed testing instructions.","PHLzszS8ei3_chkf6_pEsQZ9tHA-Hd1PRQjSxcAQM14",1780655738305]