-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
190 lines (182 loc) · 4.62 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
service: vrc-vs-server
frameworkVersion: '3'
plugins:
- serverless-python-requirements
custom:
table: ${self:service}-${opt:stage}-table
pythonRequirements:
dockerizePip: true
dockerImage: public.ecr.aws/sam/build-python3.10:latest
useStaticCache: false
useDownloadCache: false
layer: true
deploymentBucket:
name: ${env:DEPLOY_BUCKET}
provider:
name: aws
runtime: python3.10
region: ap-northeast-1
role: ${env:LAMBDA_IAM}
timeout: 7
logRetentionInDays: 14
tracing:
apiGateway: false
lambda: false
package:
individually: true
exclude:
- node_modules/**
- .gitignore
- package-lock.json
- requirements.txt
- serverless.yml
- .env
- memo.txt
- example.py
- src/**
- LICENSE
layers:
utilsLayer:
path: src/layers/utils
name: ${opt:stage}-${self:service}-utilsLayer
description: utils
compatibleRuntimes:
- python3.8
functions:
rv_entry_regist:
handler: src/lambda/rv_entry_regist/handler.main
package:
include:
- src/lambda/rv_entry_regist/handler.py
environment:
TABLE: ${self:custom.table}
NOTIC_URL: ${env:NOTIC_URL}
OTHELLO_URL: ${env:OTHELLO_URL}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/entry/regist
method: get
rv_matching_check:
handler: src/lambda/rv_matching_check/handler.main
package:
include:
- src/lambda/rv_matching_check/handler.py
environment:
TABLE: ${self:custom.table}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/entry/check
method: get
rv_action_regist:
handler: src/lambda/rv_action_regist/handler.main
package:
include:
- src/lambda/rv_action_regist/handler.py
environment:
TABLE: ${self:custom.table}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/action/regist
method: get
rv_action_check:
handler: src/lambda/rv_action_check/handler.main
package:
include:
- src/lambda/rv_action_check/handler.py
environment:
TABLE: ${self:custom.table}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/action/check
method: get
rv_entry_canncel:
handler: src/lambda/rv_entry_canncel/handler.main
package:
include:
- src/lambda/rv_entry_canncel/handler.py
environment:
TABLE: ${self:custom.table}
NOTIC_URL: ${env:NOTIC_URL}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/entry/canncel
method: get
rv_entry_giveup:
handler: src/lambda/rv_entry_giveup/handler.main
package:
include:
- src/lambda/rv_entry_giveup/handler.py
environment:
TABLE: ${self:custom.table}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/entry/giveup
method: get
rv_terminal_regist:
handler: src/lambda/rv_terminal_regist/handler.main
package:
include:
- src/lambda/rv_terminal_regist/handler.py
environment:
TABLE: ${self:custom.table}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/terminal/regist
method: get
rv_history:
handler: src/lambda/rv_history/handler.main
package:
include:
- src/lambda/rv_history/handler.py
environment:
TABLE: ${self:custom.table}
layers:
- { Ref: UtilsLayerLambdaLayer }
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
path: /rv/match/data
method: get
resources:
Resources:
VRCVSTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.table}
AttributeDefinitions:
- AttributeName: attribute_name
AttributeType: S
- AttributeName: attribute_key
AttributeType: S
KeySchema:
- AttributeName: attribute_name
KeyType: HASH
- AttributeName: attribute_key
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TimeToLiveSpecification:
AttributeName: TTL
Enabled: True