[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-apigw-lambda-bedrock-sam-node":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":13,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":33,"level":34,"meta":35,"patternArch":36,"resources":55,"s3URL":6,"services":6,"stem":63,"testing":64,"videoId":6,"__hash__":67},"patterns\u002Fpatterns\u002Fapigw-lambda-bedrock-sam-node.json","Amazon API Gateway response streaming with AWS Lambda integration",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11,12],"content\u002Fcontributors\u002Fbiswanath-mukherjee.json","content\u002Fcontributors\u002Fgiedrius-praspaliauskas.json",{"text":14},[15,16],"sam build","sam deploy --guided","This sample project demonstrates how to deploy Amazon API Gateway REST API with response streaming for AWS Lambda backend.","json","AWS SAM",{"template":21},{"repoURL":22,"templateURL":23,"projectFolder":24,"templateFile":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-lambda-bedrock-sam-node","serverless-patterns\u002Fapigw-lambda-bedrock-sam-node","apigw-lambda-bedrock-sam-node","template.yaml",{"headline":27,"text":28},"How it works",[29,30,31,32],"Amazon API Gateway receives the HTTP POST request containing the prompt.","The API Gateway triggers the Lambda functions which use either InvokeModelWithResponseStreamCommand or InvokeModelCommand to call Bedrock for streaming and non-streaming use cases.","The foundation model in Bedrock generates content and streams or returns the response to the respective Lambda functions.","The API Gateway either streams the responses back to the client or returns the whole response together.","Node.js","200",{},{"icon1":37,"icon2":42,"icon3":45,"line1":49,"line2":53},{"x":38,"y":39,"service":40,"label":41},20,50,"apigw","Amazon API Gateway REST API",{"x":39,"y":39,"service":43,"label":44},"lambda","AWS Lambda",{"x":46,"y":39,"service":47,"label":48},80,"bedrock","Amazon Bedrock",{"from":50,"to":51,"label":52},"icon1","icon2","Streaming request",{"from":51,"to":54},"icon3",{"bullets":56},[57,60],{"text":58,"link":59},"Stream the integration response for your proxy integrations in API Gateway","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fresponse-transfer-mode.html",{"text":61,"link":62},"AWS Blog - 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","patterns\u002Fapigw-lambda-bedrock-sam-node",{"text":65},[66],"See the GitHub repo for detailed testing instructions.","U48mX1R3RmDxTF-MFkcRjynMqSjy43gyHPo1aoiP-Ck",1778846882096]