-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
87 lines (80 loc) · 1.9 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
service: content-api
package:
individually: true
exclude:
- node_modules/**
custom:
env: ${lower(${opt:stage, self:provider.stage})}
vpcSettings:
prod:
securityGroupIds:
- sg-052314a1eec2f2567
subnetIds:
- subnet-01a6b61d749d10c46
current: ${ternary(${self:custom.env}, prod, ${self:custom.vpcSettings.prod}, ~)}
provider:
name: aws
runtime: nodejs18.x
memorySize: 1024
timeout: 300
region: us-east-2
iam:
role: arn:aws:iam::428019619026:role/ChurchAppsRole
environment:
APP_ENV: ${self:custom.env}
layers:
dependencies:
path: layer
name: ${self:service}-${sls:stage}-dependencies
description: Dependencies for ${self:service}
compatibleRuntimes:
- nodejs18.x
functions:
api:
name: content-api-${sls:stage}-api
handler: lambda.universal
events:
- http:
path: /{proxy+}
method: ANY
- http:
path: /
method: ANY
vpc: ${self:custom.vpcSettings.current}
layers:
- {Ref: DependenciesLambdaLayer}
package:
patterns:
- '!node_modules/**'
- '!package-lock.json'
- '**'
nightly:
name: membership-api-${sls:stage}-nightly
handler: lambda.nightly
events:
- schedule:
rate: cron(0 0 * * ? *)
enabled: true
vpc: ${self:custom.vpcSettings.current}
layers:
- {Ref: DependenciesLambdaLayer}
package:
patterns:
- '!node_modules/**'
- '!package-lock.json'
timer2Monday:
name: membership-api-${sls:stage}-timer2Monday
handler: lambda.timer2Monday
events:
- schedule:
rate: cron(0 2 ? * MON *)
enabled: true
vpc: ${self:custom.vpcSettings.current}
layers:
- {Ref: DependenciesLambdaLayer}
package:
patterns:
- '!node_modules/**'
- '!package-lock.json'
plugins:
- serverless-plugin-utils