-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
106 lines (101 loc) · 3.11 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
service: visual-knight-platform
provider:
name: aws
runtime: nodejs10.x
memorySize: 512
timeout: 60
stage: ${opt:stage, 'dev'}
region: ${opt:region, 'eu-central-1'}
profile: ${env:AWS_PROFILE_VISUAL_KNIGHT_PLATFORM}
apiGateway:
minimumCompressionSize: 1024
tracing:
apiGateway: true
lambda: true
environment: ${file(./config/env.yml)}
layers:
nestjs:
path: layers/nestjs # required, path to layer contents on disk
name: ${self:provider.stage}-nestjs # optional, Deployed Lambda layer name
compatibleRuntimes: # optional, a list of runtimes this layer is compatible with
- nodejs10.x
retain: false # optional, false by default. If true, layer versions are not deleted as new ones are created
photon:
path: layers/photon # required, path to layer contents on disk
name: ${self:provider.stage}-photon # optional, Deployed Lambda layer name
compatibleRuntimes: # optional, a list of runtimes this layer is compatible with
- nodejs10.x
retain: false # optional, false by default. If true, layer versions are not deleted as new ones are created
package:
individually: true
functions:
webapp:
handler: main.handler
package:
artifact: dist/apps/api/main.js.zip
layers:
- { Ref: NestjsLambdaLayer }
- { Ref: PhotonLambdaLayer }
events:
- http:
cors: true
method: any
path: /graphql
# comparison:
# handler: apps/backend-comparison/dist/index.handler
# package:
# artifact: apps/backend-comparison/dist/comparison.zip
# events:
# - http:
# cors: true
# method: any
# path: /comparison
# - http:
# cors: true
# path: '/comparison/{proxy+}'
# method: any
# processTestsessionImage:
# handler: apps/lambdas/dist/processTestsessionImage.handler
# package:
# artifact: apps/lambdas/dist/processTestsessionImage.zip
# events:
# - s3:
# bucket: visual-knight-platform-photos
# event: s3:ObjectCreated:*
# rules:
# - suffix: .screenshot.png
# environment:
# threshold: 12
# includeAA: true
# imageBucketName: 'visual-knight-images'
# invokeTestsession:
# handler: apps/lambdas/dist/invokeTestsession.handler
# package:
# artifact: apps/lambdas/dist/invokeTestsession.zip
# events:
# - http:
# path: /invokeTestsession
# method: post
# cors: true
# integration: lambda-proxy
# - http:
# path: /invokeTestsession
# method: get
# cors: true
# integration: lambda-proxy
# environment:
# threshold: 12
# includeAA: true
# imageBucketName: 'visual-knight-images'
# getTestsessionStatus:
# handler: apps/lambdas/dist/getTestsessionStatus.handler
# package:
# artifact: apps/lambdas/dist/getTestsessionStatus.zip
# events:
# - http:
# path: /getTestsessionStatus
# method: get
# cors: true
# integration: lambda-proxy
# environment:
# app_url: ${env:APP_URL}