[{"data":1,"prerenderedAt":74},["ShallowReactive",2],{"pattern-apigw-websocket-sqs-lambda":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":29,"language":34,"level":35,"meta":36,"patternArch":37,"resources":55,"s3URL":6,"services":67,"stem":68,"testing":69,"videoId":28,"__hash__":73},"patterns\u002Fpatterns\u002Fapigw-websocket-sqs-lambda.json","Amazon API Gateway WebSocket API to Amazon SQS to AWS Lambda",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[13],"content\u002Fcontributors\u002Fsteven-warwick.json",{"text":15},[16],"sam deploy --guided","Create an API Gateway websocket API that sends events to SQS and then to Lambda","json","AWS SAM",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"apigw-websocket-api-sqs-lambda","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-websocket-api-sqs-lambda","serverless-patterns\u002Fapigw-apigw-websocket-api-sqs-lambda","template.yaml",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31,"test":28},"How it works",[32,33],"This pattern creates an Amazon API Gateway WebSocket API which sends inbound messages to an Amazon SQS FIFO queue. The queue is processed by an AWS Lambda function to return a result.","The queue acts as a buffer to alleviate traffic spikes and ensure your workload can sustain the arriving load by buffering all the requests durably. It also helps downstream consumers to process the incoming requests at a consistent pace. A FIFO (First-In-First-Out) queue is used to ensure that evens are processed in order of arrival.","Node.js","200",{},{"icon1":38,"icon2":43,"icon3":46,"line1":50,"line2":53},{"x":39,"y":40,"service":41,"label":42},20,50,"apigw","API Gateway WebSocket API",{"x":40,"y":40,"service":44,"label":45},"sqs","SQS",{"x":47,"y":40,"service":48,"label":49},80,"lambda","AWS Lambda",{"from":51,"to":52,"label":28},"icon1","icon2",{"from":52,"to":54,"label":28},"icon3",{"headline":56,"bullets":57},"Additional resources",[58,61,64],{"text":59,"link":60},"Working with WebSocket APIs","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-websocket-api.html",{"text":62,"link":63},"Announcing WebSocket APIs in Amazon API Gateway","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fannouncing-websocket-apis-in-amazon-api-gateway\u002F",{"text":65,"link":66},"Lambda Function Handler","https:\u002F\u002Fdocs.aws.amazon.com\u002Fwhitepapers\u002Flatest\u002Fserverless-architectures-lambda\u002Fthe-handler.html",{"from":41,"to":48},"patterns\u002Fapigw-websocket-sqs-lambda",{"headline":70,"text":71},"Testing",[72],"See the repo for detailed testing instructions.","uchURNbifEgYKVlserZ2yNC4TfHVdDcW04xANhAuUHA",1778846883095]