[{"data":1,"prerenderedAt":64},["ShallowReactive",2],{"pattern-apigw-websocket-api-sns-terraform":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":27,"language":34,"level":35,"meta":36,"patternArch":37,"resources":51,"s3URL":6,"services":6,"stem":59,"testing":60,"videoId":6,"__hash__":63},"patterns\u002Fpatterns\u002Fapigw-websocket-api-sns-terraform.json","API WebSocket to Amazon SNS with request validation",null,{"text":8},[9,10,11],"\u003Ccode>terraform destroy -target aws_apigatewayv2_route.send_order\u003Ccode>","\u003Ccode>terraform destroy\u003Ccode>","\u003Ccode>terraform show\u003Ccode>",[13],"content\u002Fcontributors\u002Fdushyant-pal.json",{"text":15},[16,17],"terraform init","terraform apply","Create a WebSocket API to send notification via SNS topic with request validation","json","Terraform",{"template":22},{"repoURL":23,"templateURL":24,"projectFolder":25,"templateFile":26},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-websocket-api-sns-terraform","serverless-patterns\u002Fapigw-websocket-api-sns-terraform","apigw-websocket-api-sns-terraform","main.tf",{"headline":28,"text":29},"How it works",[30,31,32,33],"This sample project demonstrates how to use an Amazon API Gateway WebSocket API to integrate with Amazon Simple Notification service (SNS) to send notifications. This pattern also implements data validation in the WebSocket API using a model in API Gateway.","This pattern is utilizing native AWS Integration between WebSocket API Gateway and SNS. A request template is used in WebSocket integration to map the input to SNS payload.","This pattern is also a workaround to invoke AWS services in WebSocket API which requires the Content-Type header to be application\u002Fx-www-form-urlencoded. By default, WebSocket APIs do not support overriding headers from AWS console.","This pattern deploys one API Gateway and one SNS topic.","Integration","200",{},{"icon1":38,"icon2":43,"line1":47},{"x":39,"y":40,"service":41,"label":42},25,50,"apigw","Amazon API Gateway",{"x":44,"y":40,"service":45,"label":46},75,"sns","Amazon SNS",{"from":48,"to":49,"label":50},"icon1","icon2","",{"bullets":52},[53,56],{"text":54,"link":55},"Request validation in WebSocket API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fwebsocket-api-request-validation.html",{"text":57,"link":58},"Mapping template in WebSocket API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fwebsocket-api-data-transformations.html","patterns\u002Fapigw-websocket-api-sns-terraform",{"text":61},[62],"See the GitHub repo for detailed testing instructions.","q6MMiYnY884S6Zg6Mv-ebcxN-uQ2wx850utnGypAp_g",1778846883049]