-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
79 lines (69 loc) · 1.59 KB
/
serverless.yml
File metadata and controls
79 lines (69 loc) · 1.59 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
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
service:
name: portfolio-tracker-service
plugins:
- serverless-bundle
- serverless-pseudo-parameters
provider:
name: aws
runtime: nodejs14.x
memorySize: 256
stage: ${opt:stage, 'dev'}
region: us-west-2
environment:
PORTFOLIO_TRACKER_TABLE_NAME: ${self:custom.PortfolioTrackerTable.name}
iamRoleStatements:
- ${file(iam/PortfolioTrackerTableIAM.yml):PortfolioTrackerTableIAM}
resources:
Resources:
PortfolioTrackerTable: ${file(resources/PortfolioTrackerTable.yml):PortfolioTrackerTable}
functions:
logUser:
handler: src/handlers/logUser.handler
events:
- http:
method: POST
path: /logUser
cors: true
memorySize: 256
logSession:
handler: src/handlers/logSession.handler
events:
- http:
method: POST
path: /logSession
cors: true
memorySize: 256
logDiv:
handler: src/handlers/logDiv.handler
events:
- http:
method: PATCH
path: /logDiv
cors: true
logLink:
handler: src/handlers/logLink.handler
events:
- http:
method: PATCH
path: /logLink
cors: true
getUser:
handler: src/handlers/getUser.handler
events:
- http:
method: GET
path: /user
cors: true
getUserByIP:
handler: src/handlers/getUserByIP.handler
events:
- http:
method: GET
path: /user/{ip}
cors: true
custom:
bundle:
linting: false
PortfolioTrackerTable:
name: !Ref PortfolioTrackerTable
arn: !GetAtt PortfolioTrackerTable.Arn