|
| 1 | +{ |
| 2 | + "title": "Amazon API Gateway WebSocket API with Amazon CloudFront & AWS WAF", |
| 3 | + "description": "Protecting an Amazon API Gateway WebSocket API with Amazon CloudFront, AWS WAF Integration and API Keys", |
| 4 | + "language": "Python", |
| 5 | + "level": "200", |
| 6 | + "framework": "CDK", |
| 7 | + "introBox": { |
| 8 | + "headline": "How it works", |
| 9 | + "text": [ |
| 10 | + "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." |
| 11 | + ] |
| 12 | + }, |
| 13 | + "gitHub": { |
| 14 | + "template": { |
| 15 | + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/<>", |
| 16 | + "templateURL": "serverless-patterns/<>", |
| 17 | + "projectFolder": "<>", |
| 18 | + "templateFile": "my_websocket_api_stack.py" |
| 19 | + } |
| 20 | + }, |
| 21 | + "resources": { |
| 22 | + "bullets": [ |
| 23 | + { |
| 24 | + "text": "Protecting your API using Amazon API Gateway and AWS WAF", |
| 25 | + "link": "https://aws.amazon.com/blogs/compute/protecting-your-api-using-amazon-api-gateway-and-aws-waf-part-2/" |
| 26 | + }, |
| 27 | + { |
| 28 | + "text": "Route Configuration for a WebSocket API", |
| 29 | + "link": "https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-develop-routes.html#apigateway-websocket-api-routes" |
| 30 | + } |
| 31 | + ] |
| 32 | + }, |
| 33 | + "deploy": { |
| 34 | + "text": [ |
| 35 | + "cdk deploy" |
| 36 | + ] |
| 37 | + }, |
| 38 | + "testing": { |
| 39 | + "text": [ |
| 40 | + "See the GitHub repo for detailed testing instructions." |
| 41 | + ] |
| 42 | + }, |
| 43 | + "cleanup": { |
| 44 | + "text": [ |
| 45 | + "cdk destroy" |
| 46 | + ] |
| 47 | + }, |
| 48 | + "authors": [ |
| 49 | + { |
| 50 | + "name": "Sidharth Kothari", |
| 51 | + "image": "https://www.linkedin.com/in/sidharthkothari/", |
| 52 | + "bio": "Cloud Engineer @AWS", |
| 53 | + "linkedin": "sidharthkothari" |
| 54 | + } |
| 55 | + ], |
| 56 | + "patternArch": { |
| 57 | + "icon1": { |
| 58 | + "x": 15, |
| 59 | + "y": 50, |
| 60 | + "service": "waf", |
| 61 | + "label": "AWS WAF" |
| 62 | + }, |
| 63 | + "icon2": { |
| 64 | + "x": 40, |
| 65 | + "y": 50, |
| 66 | + "service": "cloudfront", |
| 67 | + "label": "Amazon CloudFront" |
| 68 | + }, |
| 69 | + "icon3": { |
| 70 | + "x": 65, |
| 71 | + "y": 50, |
| 72 | + "service": "api-gateway", |
| 73 | + "label": "Amazon API Gateway" |
| 74 | + }, |
| 75 | + "icon4": { |
| 76 | + "x": 90, |
| 77 | + "y": 50, |
| 78 | + "service": "lambda", |
| 79 | + "label": "AWS Lambda" |
| 80 | + }, |
| 81 | + "line1": { |
| 82 | + "from": "icon1", |
| 83 | + "to": "icon2" |
| 84 | + }, |
| 85 | + "line2": { |
| 86 | + "from": "icon2", |
| 87 | + "to": "icon3" |
| 88 | + }, |
| 89 | + "line3": { |
| 90 | + "from": "icon3", |
| 91 | + "to": "icon4" |
| 92 | + } |
| 93 | + } |
| 94 | +} |
0 commit comments