|
| 1 | +{ |
| 2 | + "title": "Websocket API Gateway with an AWS Lambda Authorizer and mapping template", |
| 3 | + "description": "Create a Websocket API with a Lambda Authorizer and an AWS Lambda in the back-end.", |
| 4 | + "language": "Node.js", |
| 5 | + "level": "200", |
| 6 | + "framework": "AWS SAM", |
| 7 | + "introBox": { |
| 8 | + "headline": "How it works", |
| 9 | + "text": [ |
| 10 | + "This projects demonstrates how to use a WebSocket API with an AWS Lambda Authorizer", |
| 11 | + "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.", |
| 12 | + "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" |
| 13 | + ] |
| 14 | + }, |
| 15 | + "gitHub": { |
| 16 | + "template": { |
| 17 | + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/apigw-websocket-mapping-template-authorizer", |
| 18 | + "templateURL": "serverless-patterns/apigw-websocket-mapping-template-authorizer", |
| 19 | + "projectFolder": "apigw-websocket-mapping-template-authorizer", |
| 20 | + "templateFile": "template.yaml" |
| 21 | + } |
| 22 | + }, |
| 23 | + "resources": { |
| 24 | + "bullets": [ |
| 25 | + { |
| 26 | + "text": "Invoke a Webscoket API with wscat", |
| 27 | + "link": "https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-how-to-call-websocket-api-wscat.html" |
| 28 | + }, |
| 29 | + { |
| 30 | + "text": "Integration request in Websocket API Gateway", |
| 31 | + "link": "https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-requests.html" |
| 32 | + }, |
| 33 | + { |
| 34 | + "text": "Control access to WebSocket APIs with AWS Lambda REQUEST authorizers", |
| 35 | + "link": "https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-lambda-auth.html" |
| 36 | + } |
| 37 | + ] |
| 38 | + }, |
| 39 | + "deploy": { |
| 40 | + "text": ["sam deploy"] |
| 41 | + }, |
| 42 | + "testing": { |
| 43 | + "text": ["See the GitHub repo for detailed testing instructions."] |
| 44 | + }, |
| 45 | + "cleanup": { |
| 46 | + "text": ["Delete the stack: <code>sam delete</code>."] |
| 47 | + }, |
| 48 | + "authors": [ |
| 49 | + { |
| 50 | + "name": "Alice Goumain", |
| 51 | + "image": "https://media.licdn.com/dms/image/v2/C4E03AQFu1xnGt76xzg/profile-displayphoto-shrink_200_200/profile-displayphoto-shrink_200_200/0/1662636937225?e=2147483647&v=beta&t=f4IFRXMLweHD9WieD3X1D3YkZO3Hf-bdTXHAfYcFpbo", |
| 52 | + "bio": "Cloud Support Engineer in Serverless @ AWS", |
| 53 | + "linkedin": "alice-goumain/" |
| 54 | + } |
| 55 | + ], |
| 56 | + "patternArch": { |
| 57 | + "icon1": { |
| 58 | + "x": 20, |
| 59 | + "y": 50, |
| 60 | + "service": "apigw", |
| 61 | + "label": "API Gateway WebSocket" |
| 62 | + }, |
| 63 | + "icon2": { |
| 64 | + "x": 50, |
| 65 | + "y": 50, |
| 66 | + "service": "lambda", |
| 67 | + "label": "AWS Lambda" |
| 68 | + }, |
| 69 | + "icon3": { |
| 70 | + "x": 80, |
| 71 | + "y": 50, |
| 72 | + "service": "dynamodb", |
| 73 | + "label": "Amazon DynamoDB" |
| 74 | + }, |
| 75 | + "line1": { |
| 76 | + "from": "icon1", |
| 77 | + "to": "icon2", |
| 78 | + "label": "" |
| 79 | + }, |
| 80 | + "line2": { |
| 81 | + "from": "icon2", |
| 82 | + "to": "icon3", |
| 83 | + "label": "" |
| 84 | + } |
| 85 | + } |
| 86 | +} |
0 commit comments