[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-apigw-websocket-api-bedrock-streaming-rust-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":50,"s3URL":6,"services":6,"stem":63,"testing":64,"videoId":6,"__hash__":67},"patterns\u002Fpatterns\u002Fapigw-websocket-api-bedrock-streaming-rust-cdk.json","Streaming Amazon Bedrock response with Amazon API Gateway",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fphil-callister.json",{"text":13},[14],"cdk deploy","Stream an Amazon Bedrock LLM response with API Gateway WebSocket API and AWS Lambda function .","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-websocket-api-bedrock-streaming-rust-cdk","serverless-patterns\u002Fapigw-websocket-api-bedrock-streaming-rust-cdk","apigw-websocket-api-bedrock-streaming-rust-cdk","cdk\u002Flib\u002Fbedrock-streamer-stack.ts",{"headline":25,"text":26},"How it works",[27,28],"This pattern establishes a WebSocket connection to Amazon API Gateway. When requests are made to this API, API Gateway routes them to an AWS Lambda function.","The Lambda function then initiates a streaming request to Amazon Bedrock using the ConverseStream API. This allows the response from the LLM in Bedrock to start streaming back to the Lambda function as soon as generation begins, without waiting for the entire response to be ready.","Rust","200",{},{"icon1":33,"icon2":38,"icon3":41,"line1":45,"line3":48},{"x":34,"y":35,"service":36,"label":37},20,50,"apigw","API Gateway Websocket API",{"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},"icon1","icon2",{"from":47,"to":49},"icon3",{"bullets":51},[52,55,57,60],{"text":53,"link":54},"Working with WebSocket APIs","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-websocket-api.html",{"text":44,"link":56},"https:\u002F\u002Faws.amazon.com\u002Fbedrock\u002F",{"text":58,"link":59},"Cloud Development Kit","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcdk\u002Fv2\u002Fguide\u002Fhome.html",{"text":61,"link":62},"AWS SDK for Rust","https:\u002F\u002Faws.amazon.com\u002Fsdk-for-rust\u002F","patterns\u002Fapigw-websocket-api-bedrock-streaming-rust-cdk",{"text":65},[66],"See the GitHub repo for detailed testing instructions.","BDXwce4G5tSRDy5CgjB7azSXYhdSGIXISn0Q9G6z-A4",1779273333450]