[{"data":1,"prerenderedAt":59},["ShallowReactive",2],{"pattern-lambda-streaming-ttfb-write-sam-with-bedrock-streaming":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":46,"s3URL":6,"services":6,"stem":54,"testing":55,"videoId":6,"__hash__":58},"patterns\u002Fpatterns\u002Flambda-streaming-ttfb-write-sam-with-bedrock-streaming.json","Streaming response with Amazon Bedrock and AWS Lambda function URLs",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fian-chenyang-zhao.json",{"text":13},[14],"sam deploy","Create an LLM streaming response API with Lambda Function URLs.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-streaming-ttfb-write-sam-with-bedrock-streaming","serverless-patterns\u002Flambda-streaming-ttfb-write-sam-with-bedrock-streaming","lambda-streaming-ttfb-write-sam-with-bedrock-streaming","template.yaml",{"headline":25,"text":26},"How it works",[27,28],"This sample project demonstrates how to use an Lambda Function URL streaming ability and Bedrock runtime `InvokeModelWithResponseStreamCommand` to build an LLM response streaming API.","This pattern deploys a Lambda Function. Since Bedrock access is limited to certain Regions, user must set BEDROCK_AWS_ACCESS_KEY_ID and BEDROCK_AWS_SECRET_ACCESS_KEY environment variables for the Lambda Function to allow request across Regions.","Node.js","200",{},{"icon1":33,"icon2":38,"line1":42},{"x":34,"y":35,"service":36,"label":37},20,50,"lambda","AWS Lambda",{"x":39,"y":35,"service":40,"label":41},80,"bedrock","Amazon Bedrock",{"from":43,"to":44,"label":45},"icon1","icon2","Response stream via function URLs",{"bullets":47},[48,51],{"text":49,"link":50},"Introducing AWS Lambda response streaming","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fintroducing-aws-lambda-response-streaming\u002F",{"text":52,"link":53},"Configure Lambda Function Response Streaming","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-response-streaming.html","patterns\u002Flambda-streaming-ttfb-write-sam-with-bedrock-streaming",{"text":56},[57],"See the GitHub repo for detailed testing instructions.","7NFhw7aCEB3LzPxJruFWAvo945faSRffSwE-rAbgu9o",1779273338008]