[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-apigw-streaming-lambda-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":30,"level":31,"meta":32,"patternArch":33,"resources":52,"s3URL":6,"services":6,"stem":62,"testing":63,"videoId":6,"__hash__":66},"patterns\u002Fpatterns\u002Fapigw-streaming-lambda-bedrock-cdk.json","Stream Amazon Bedrock responses with Amazon API Gateway",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":13},[14],"cdk deploy","Stream LLM responses from Amazon Bedrock through Amazon API Gateway REST API using AWS Lambda response streaming for real-time AI chat experiences.","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-streaming-lambda-bedrock-cdk","serverless-patterns\u002Fapigw-streaming-lambda-bedrock-cdk","apigw-streaming-lambda-bedrock-cdk","lib\u002Fapigw-streaming-lambda-bedrock-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"This pattern deploys an Amazon API Gateway REST API with response streaming enabled, backed by an AWS Lambda function that streams responses from Amazon Bedrock (Claude) in real-time using Server-Sent Events (SSE).","When a client sends a prompt, API Gateway forwards it to a streaming Lambda function. The function invokes Amazon Bedrock and progressively writes each text chunk to the response stream. The client receives tokens as they are generated, dramatically reducing time-to-first-byte.","This pattern is ideal for building AI chatbots, copilots, and interactive assistants where real-time streaming improves user experience.","TypeScript","300",{},{"icon1":34,"icon2":39,"icon3":43,"line1":47,"line2":50},{"x":35,"y":36,"service":37,"label":38},20,50,"apigw","Amazon API Gateway REST API",{"x":40,"y":36,"service":41,"label":42},57,"lambda","AWS Lambda (Streaming)",{"x":44,"y":36,"service":45,"label":46},85,"bedrock","Amazon Bedrock",{"from":48,"to":49},"icon1","icon2",{"from":49,"to":51},"icon3",{"bullets":53},[54,57,60],{"text":55,"link":56},"Building responsive APIs with Amazon API Gateway response streaming","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbuilding-responsive-apis-with-amazon-api-gateway-response-streaming\u002F",{"text":58,"link":59},"Serverless strategies for streaming LLM responses","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fserverless-strategies-for-streaming-llm-responses\u002F",{"text":46,"link":61},"https:\u002F\u002Faws.amazon.com\u002Fbedrock\u002F","patterns\u002Fapigw-streaming-lambda-bedrock-cdk",{"text":64},[65],"See the GitHub repo for detailed testing instructions.","oTdaJSMOikDQfUSpsmH-ML5lfQn92GTEDHp6qIBt97Q",1778846882901]