[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-apigw-websocket-mapping-template-authorizer":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":63,"testing":64,"videoId":6,"__hash__":67},"patterns\u002Fpatterns\u002Fapigw-websocket-mapping-template-authorizer.json","Websocket Amazon API Gateway with an AWS Lambda Authorizer and mapping template",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Falice-goumain.json",{"text":13},[14],"sam deploy","Create a Websocket API with a Lambda Authorizer and an AWS Lambda in the back-end.","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-mapping-template-authorizer","serverless-patterns\u002Fapigw-websocket-mapping-template-authorizer","apigw-websocket-mapping-template-authorizer","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29],"This projects demonstrates how to use a WebSocket API with an AWS Lambda Authorizer","The WebSocket API does not have a Proxy integration with the back-end Lambda Function written NodeJs 22, instead it is using a mapping template that forwards the main information of the request.","The Connection ID is stored in a Amazon DynamoDB table and the Lambda Function sends a response to the websocket API through the endpoint URL","Node.js","200",{},{"icon1":34,"icon2":39,"icon3":42,"line1":46,"line2":50},{"x":35,"y":36,"service":37,"label":38},20,50,"apigw","Amazon API Gateway WebSocket",{"x":36,"y":36,"service":40,"label":41},"lambda","AWS Lambda",{"x":43,"y":36,"service":44,"label":45},80,"dynamodb","Amazon DynamoDB",{"from":47,"to":48,"label":49},"icon1","icon2","",{"from":48,"to":51,"label":49},"icon3",{"bullets":53},[54,57,60],{"text":55,"link":56},"Invoke a Webscoket API with wscat","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-how-to-call-websocket-api-wscat.html",{"text":58,"link":59},"Integration request in Websocket API Gateway","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-websocket-api-integration-requests.html",{"text":61,"link":62},"Control access to WebSocket APIs with AWS Lambda REQUEST authorizers","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fapigateway-websocket-api-lambda-auth.html","patterns\u002Fapigw-websocket-mapping-template-authorizer",{"text":65},[66],"See the GitHub repo for detailed testing instructions.","gfzHsQS0avYB3GnVjD6fSpV1QHAa8f96xXx0EutGp4k",1779273333529]