[{"data":1,"prerenderedAt":69},["ShallowReactive",2],{"pattern-apigw-websocket-lambda-bedrock-sam":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":31,"level":32,"meta":33,"patternArch":34,"resources":52,"s3URL":6,"services":6,"stem":64,"testing":65,"videoId":6,"__hash__":68},"patterns\u002Fpatterns\u002Fapigw-websocket-lambda-bedrock-sam.json","AI Chat with Amazon API Gateway (WebSockets), AWS Lambda and Amazon Bedrock",null,{"text":8},[9],"\u003Ccode>sam delete\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fmike-hume.json",{"text":13},[14],"sam deploy","WebSocket-Enabled AI Chat Using AWS Services.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-websocket-lambda-bedrock-sam","serverless-patterns\u002Fapigw-websocket-lambda-bedrock-sam","apigw-websocket-lambda-bedrock-sam","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29,30],"This serverless architecture enables real-time AI chat using AWS services. A WebSocket Amazon API Gateway maintains persistent connections between clients and a Node.js AWS Lambda function.","The AWS Lambda function handles user connections\u002Fdisconnections, stores connection IDs in Amazon DynamoDB, and processes messages through an Amazon Bedrock LLM.","The system includes error handling, automatic scaling, and pay-per-use pricing.","The AWS SAM template provisions all necessary resources and IAM permissions, outputting a WebSocket URL for client connections.","Python","200",{},{"icon1":35,"icon2":40,"icon3":43,"line1":47,"line2":50},{"x":36,"y":37,"service":38,"label":39},20,50,"apigw","API Gateway Websocket API",{"x":37,"y":37,"service":41,"label":42},"lambda","AWS Lambda",{"x":44,"y":37,"service":45,"label":46},80,"bedrock","Amazon Bedrock",{"from":48,"to":49},"icon1","icon2",{"from":49,"to":51},"icon3",{"bullets":53},[54,57,60,62],{"text":55,"link":56},"Amazon API Gateway","https:\u002F\u002Faws.amazon.com\u002Fapi-gateway\u002F",{"text":58,"link":59},"Amazon API Gateway WebSocket APIs","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-websocket-api.html",{"text":42,"link":61},"https:\u002F\u002Faws.amazon.com\u002Flambda\u002F",{"text":46,"link":63},"https:\u002F\u002Faws.amazon.com\u002Fbedrock\u002F","patterns\u002Fapigw-websocket-lambda-bedrock-sam",{"text":66},[67],"See the GitHub repo for detailed testing instructions.","edqHk0lPU0OyUYvysPSQcG2XJVRznWRUezJPjCmsF-s",1781087767218]