forked from Triple-Take-Technologies/aws_gw_lambda_simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
52 lines (43 loc) · 1.14 KB
/
serverless.yml
File metadata and controls
52 lines (43 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
service: test
provider:
name: aws
stage: ${opt:stage}
environment:
runtime: nodejs12.x
# define the property used for auto-routing of websocket messages
websocketsApiRouteSelectionExpression: $request.body.action
functions:
restAuthorizerFunc:
handler: rest-auth.handler
restHandlerFunc:
handler: rest-main.handler
events:
- http:
path: /
method: get
- http:
path: /
method: post
private: true
authorizer:
name: restAuthorizerFunc
identitySource: method.request.header.x-api-key
type: request
websocketConnectionHandler:
handler: ws-main.onConnect
events:
- websocket:
route: $connect
routeResponseSelectionExpression: $default
authorizer:
name: websocketAuth
identitySource:
- 'route.request.querystring.code'
websocketAuth:
handler: ws-auth.handler
websocketMessageHandler:
handler: ws-main.onMessage
events:
- websocket:
route: message
routeResponseSelectionExpression: $default