[{"data":1,"prerenderedAt":69},["ShallowReactive",2],{"pattern-waf-cloudfront-websocket-apigw-cdk-python":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":28,"level":29,"meta":30,"patternArch":31,"resources":56,"s3URL":6,"services":6,"stem":64,"testing":65,"videoId":6,"__hash__":68},"patterns\u002Fpatterns\u002Fwaf-cloudfront-websocket-apigw-cdk-python.json","Amazon API Gateway WebSocket API with Amazon CloudFront & AWS WAF",null,{"text":8},[9],"cdk destroy",[11],"content\u002Fcontributors\u002Fsidharth-kothari.json",{"text":13},[14],"cdk deploy","Protecting an  Amazon API Gateway WebSocket API with Amazon CloudFront, AWS WAF Integration and API Keys","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fwaf-cloudfront-websocket-apigw-cdk-python","serverless-patterns\u002Fwaf-cloudfront-websocket-apigw-cdk-python","waf-cloudfront-websocket-apigw-cdk-python","my_websocket_api\u002Fmy_websocket_api_stack.py",{"headline":25,"text":26},"How it works",[27],"This pattern implements a secure WebSocket API using AWS CDK, integrating CloudFront for distribution and WAF for protection through AWS CDK with Python. It makes use of API keys to ensure that the Websocket endpoint can only be accessed via the CloudFront distribution by passing the API key as custom header from CloudFront.The WebSocket API provides real-time communication capabilities, while CloudFront ensures low-latency content delivery. The Web Application Firewall (WAF) adds an extra layer of security by protecting against common web exploits and controlling access based on configurable rules.","Python","200",{},{"icon1":32,"icon2":37,"icon3":41,"icon4":45,"line1":49,"line2":52,"line3":54},{"x":33,"y":34,"service":35,"label":36},15,50,"waf","AWS WAF",{"x":38,"y":34,"service":39,"label":40},40,"cloudfront","Amazon CloudFront",{"x":42,"y":34,"service":43,"label":44},65,"apigw","Amazon API Gateway",{"x":46,"y":34,"service":47,"label":48},90,"lambda","AWS Lambda",{"from":50,"to":51},"icon1","icon2",{"from":51,"to":53},"icon3",{"from":53,"to":55},"icon4",{"bullets":57},[58,61],{"text":59,"link":60},"Protecting your API using Amazon API Gateway and AWS WAF","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fprotecting-your-api-using-amazon-api-gateway-and-aws-waf-part-2\u002F",{"text":62,"link":63},"Route Configuration for a WebSocket API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fwebsocket-api-develop-routes.html#apigateway-websocket-api-routes","patterns\u002Fwaf-cloudfront-websocket-apigw-cdk-python",{"text":66},[67],"See the GitHub repo for detailed testing instructions.","453VClT4lLxjFZ9faTeam98cxk5icrGdmnVRmKoX9FA",1778846888687]