-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
88 lines (86 loc) · 2.3 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
86
87
88
service: moneylog-serverless
frameworkVersion: ">=1.1.0 <2.0.0"
provider:
name: aws
runtime: nodejs12.x
stage: pr
region: eu-central-1
profile: serverless
iamRoleStatements:
- Effect: "Allow"
Action:
- dynamodb:DescribeTable
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: "arn:aws:dynamodb:eu-central-1:*:*"
functions:
create:
handler: moneylog/create.createLog
name: moneylog-create-log
events:
- http:
path: api/moneylog/{username}
method: post
cors:
origin: "*"
get:
handler: moneylog/get.getLogsByUsername
name: moneylog-get-logs-by-username
events:
- http:
path: api/moneylog/{username}
method: get
cors:
origin: "*"
deleteByUsernameAndId:
handler: moneylog/deleteByUsernameAndId.deleteByUsernameAndId
name: moneylog-delete-log-by-username-and-id
events:
- http:
path: api/moneylog/{username}/{id}
method: delete
cors:
origin: "*"
updateByUsernameAndId:
handler: moneylog/updateByUsernameAndId.updateByUsernameAndId
name: moneylog-update-log-by-username-and-id
events:
- http:
path: api/moneylog/{username}/{id}
method: put
cors:
origin: "*"
registerUser:
handler: auth/functions/register.registerUser
name: moneylog-register-user
events:
- http:
path: api/moneylog/auth/register
method: post
cors:
origin: "https://moneylog.rayhard.pro"
allowCredentials: true
loginUser:
handler: auth/functions/login.loginUser
name: moneylog-login-user
events:
- http:
path: api/moneylog/auth/login
method: post
cors:
origin: "https://moneylog.rayhard.pro"
allowCredentials: true
handleRegistrationResponse:
handler: auth/functions/response.handleRegisterResponse
name: moneylog-handle-user-registration
events:
- http:
path: api/moneylog/auth/response
method: post
cors:
origin: "https://moneylog.rayhard.pro"
allowCredentials: true