forked from voteflux/voting-app-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
85 lines (73 loc) · 1.47 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
app: voting-app-api
service: voting-app-api
frameworkVersion: ">=1.1.0 <2.0.0"
plugins:
- serverless-python-requirements
- serverless-offline
provider:
name: aws
runtime: python3.7
environment:
MONGO_DB_USER: None
MONGO_DB_PASS: None
MONGO_DB_NAME: votingdb
MONGO_DB_URL: localhost:27017
iamManagedPolicies:
- "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
functions:
getbill:
handler: bill/get.get
events:
- http:
path: bill/{id}
method: get
cors: true
listbill:
handler: bill/list.list
events:
- http:
path: bill
method: get
cors: true
getissue:
handler: issue/get.get
events:
- http:
path: issue/{id}
method: get
cors: true
listissue:
handler: issue/list.list
events:
- http:
path: issue
method: get
cors: true
createuser:
handler: user/create.create
events:
- http:
path: user
method: post
cors: true
listuser:
handler: user/list.list
events:
- http:
path: user
method: get
cors: true
getuser:
handler: user/get.get
events:
- http:
path: user/{id}
method: get
cors: true
deleteuser:
handler: user/delete.delete
events:
- http:
path: user/{id}
method: delete
cors: true