-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
42 lines (39 loc) · 863 Bytes
/
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
service: adventofcode-rivals
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: eu-west-2
iamRoleStatements:
- Effect: Allow
Action:
- s3:GetObject
- s3:PutObject
Resource: "arn:aws:s3:::${self:custom.configBucket}/*"
custom:
configBucket: "adventofcode-rivals-${self:provider.stage}"
functions:
stats:
handler: dist/stats.handler
events:
- http:
path: stats/{year}
method: GET
cors: true
request:
parameters:
paths:
year: true
update:
handler: dist/update.handler
events:
- http:
path: update/{year}
method: POST
cors: true
request:
parameters:
paths:
year: true
- schedule:
rate: rate(2 hours)