-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
63 lines (56 loc) · 1.32 KB
/
serverless.yml
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
53
54
55
56
57
58
59
60
61
62
service: serverless-websocket
provider:
name: aws
runtime: python3.9
lambdaHashingVersion: '20201221'
region: ap-northeast-2
iam:
role:
statements:
- Effect: 'Allow'
Action:
- 'execute-api:ManageConnections'
Resource:
- 'arn:aws:execute-api:*:*:**/@connections/*'
- Effect: 'Allow'
Action:
- 'dynamodb:PutItem'
- 'dynamodb:GetItem'
- 'dynamodb:UpdateItem'
- 'dynamodb:DeleteItem'
- 'dynamodb:BatchGetItem'
- 'dynamodb:BatchWriteItem'
- 'dynamodb:Scan'
- 'dynamodb:Query'
Resource:
- 'arn:aws:dynamodb:ap-northeast-2:*:*'
functions:
ping:
handler: handler.ping
events:
- http:
path: ping
method: get
connectionManager:
handler: handler.connection_manager
events:
- websocket:
route: $connect
- websocket:
route: $disconnect
defaultMessage:
handler: handler.default_message
events:
- websocket:
route: $default
sendMessage:
handler: handler.send_message
events:
- websocket:
route: sendMessage
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: false
noDeploy: []