-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
60 lines (53 loc) · 1.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
service:
name: drivefine
package:
excludeDevDependencies: true
custom:
secrets: ${file(${env:SECRETS})}
webpack:
includeModules: yes
provider:
name: aws
runtime: nodejs12.x
memorySize: 256 # Overwrite the default memory size. Default is 1024
timeout: 6 # optional, in seconds, default is 6
environment:
NODE_ENV: ${self:custom.secrets.NODE_ENV}
DATABASE_URL: ${self:custom.secrets.DATABASE_URL}
MIAMI_DADE_COUNTY_AUTH_KEY: ${self:custom.secrets.MIAMI_DADE_COUNTY_AUTH_KEY}
MIAMI_DADE_USERNAME: ${self:custom.secrets.MIAMI_DADE_USERNAME}
MIAMI_DADE_PASSWORD: ${self:custom.secrets.MIAMI_DADE_PASSWORD}
BROWARD_COUNTY_AUTH_KEY: ${self:custom.secrets.BROWARD_COUNTY_AUTH_KEY}
TWILIO_ACCOUNT_SID: ${self:custom.secrets.TWILIO_ACCOUNT_SID}
TWILIO_AUTH_SID: ${self:custom.secrets.TWILIO_AUTH_SID}
TWILIO_AUTH_SECRET: ${self:custom.secrets.TWILIO_AUTH_SECRET}
vpc:
securityGroupIds:
- ${self:custom.secrets.SECURITY_GROUP1_ID}
# - ${self:custom.secrets.SECURITY_GROUP2_ID}
subnetIds:
- ${self:custom.secrets.SUBNET1_ID}
- ${self:custom.secrets.SUBNET2_ID}
# - ${self:custom.secrets.SUBNET4_ID}
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
- serverless-offline
functions:
migrate:
handler: handler.migrate
subscription:
timeout: 30
memorySize: 256
handler: handler.subscription
events:
- http:
path: subscription
method: post
cors: true
rundlReports:
timeout: 60
memorySize: 1024
handler: handler.rundlReports
events:
- schedule: cron(0/30 * * * ? *)