[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-appsync-events-bedrock-cdk":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":29,"level":30,"meta":31,"patternArch":32,"resources":52,"s3URL":6,"services":6,"stem":63,"testing":64,"videoId":6,"__hash__":67},"patterns\u002Fpatterns\u002Fappsync-events-bedrock-cdk.json","Stream Amazon Bedrock completions via AWS AppSync Events API",null,{"text":8},[9],"cdk destroy",[11],"content\u002Fcontributors\u002Fgabriele-biagini.json",{"text":13},[14],"npm run deploy","Leverage AppSync Events API to stream completions from Amazon Bedrock.","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fappsync-events-bedrock-cdk","serverless-patterns\u002Fappsync-events-bedrock-cdk","appsync-events-bedrock-cdk","lib\u002Fappsync-events-bedrock-cdk-stack.ts",{"headline":25,"text":26},"How it works",[27,28],"In this pattern the end user is able to provide a prompt that will be used to invoke an Amazon Bedrock model from via a Lambda middleware.","The client will receive the model's completions through WebSocket provided by AppSync Events.","TypeScript","200",{},{"icon1":33,"icon2":38,"icon3":41,"line1":45,"line2":49},{"x":34,"y":35,"service":36,"label":37},20,50,"apigw","Amazon API Gateway",{"x":35,"y":35,"service":39,"label":40},"lambda","AWS Lambda",{"x":42,"y":35,"service":43,"label":44},80,"bedrock","Amazon Bedrock",{"from":46,"to":47,"label":48},"icon1","icon2","WebSocket",{"from":47,"to":50,"label":51},"icon3","",{"bullets":53},[54,57,60],{"text":55,"link":56},"AppSync Events API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fappsync\u002Flatest\u002Feventapi\u002Fevent-api-welcome.html",{"text":58,"link":59},"Amazon Bedrock - Generative AI","https:\u002F\u002Faws.amazon.com\u002Fbedrock\u002F",{"text":61,"link":62},"Bedrock's Response Stream API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002FAPIReference\u002FAPI_runtime_InvokeModelWithResponseStream.html","patterns\u002Fappsync-events-bedrock-cdk",{"text":65},[66],"npm run test","oCMm6AJ4wIf-LoIaRnUPXAiTbxXqIRNlToH-cqtMHk8",1778846883254]