-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
108 lines (101 loc) · 2.33 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
service:
name: mapapp
plugins:
- serverless-webpack
- serverless-domain-manager
provider:
name: aws
runtime: nodejs10.x
stage: prod
iamRoleStatements:
- Effect: Allow
Action:
- "s3:PutObject"
Resource: "arn:aws:s3:::${s3:mapapp-secrets/S3_BACKUP_BUCKET}/*"
- Effect: Allow
Action:
- "s3:PutObject"
Resource: "arn:aws:s3:::mapapp-cache/*"
- Effect: Allow
Action:
- "s3:PutObjectAcl"
Resource: "arn:aws:s3:::mapapp-cache/*"
apiGateway:
minimumCompressionSize: 1024
package:
individually: true
custom:
webpack:
packager: "yarn"
excludeFiles: "src/**/*.spec.ts"
includeModules:
forceExclude:
- aws-sdk
customDomain:
domainName: mapapp.micah.motorcycles
stage: prod
basePath: ""
certificateName: mapapp.micah.motorcycles
createRoute53Record: false
envVars: &envVars
CACHE_FROM: "2019-09-30T00:00:00.000Z"
CACHE_TO: "2020-03-17T00:00:00.000Z"
MONGO_URL: ${s3:mapapp-secrets/MONGO_URL}
PERSIST_PASSWORD: ${s3:mapapp-secrets/PERSIST_PASSWORD}
S3_BACKUP_BUCKET: ${s3:mapapp-secrets/S3_BACKUP_BUCKET}
S3_CACHE_BUCKET: mapapp-cache
SPOT_FEED_ID: ${s3:mapapp-secrets/SPOT_FEED_ID}
functions:
mapData:
handler: src/handlers/map_data.handle
environment:
<<: *envVars
events:
- http:
method: get
path: map_data
cors: true
timeout: 15
mapMetadata:
handler: src/handlers/map_metadata.handle
environment:
<<: *envVars
events:
- http:
method: get
path: map_metadata
cors: true
gpx:
handler: src/handlers/gpx.handle
environment:
<<: *envVars
events:
- http:
method: get
path: gpx
cors: true
oneOffPersist:
handler: src/handlers/one_off_persist.handle
environment:
<<: *envVars
events:
- http:
method: post
path: one_off_persist
cors: true
persistSpot:
handler: src/handlers/scheduled_persist_spot.handle
environment:
<<: *envVars
events:
- schedule: rate(30 minutes)
timeout: 600
realtimeTrack:
handler: src/handlers/realtime_track.handle
environment:
<<: *envVars
events:
- http:
method: get
path: realtime_track
cors: true