-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
76 lines (70 loc) · 1.63 KB
/
Copy pathserverless.yml
File metadata and controls
76 lines (70 loc) · 1.63 KB
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
service: nodejs-lambda-serverless-boilerplate
plugins:
- serverless-esbuild
- serverless-offline
- serverless-offline-lambda-invoke
- serverless-dotenv-plugin
- serverless-prune-plugin
custom:
prune:
automatic: true
number: 3
esbuild:
bundle: true
minify: true
platform: 'node'
sourcesContent: false
concurrency: 8
sourcemap: 'external'
serverless-offline:
httpPort: 4000
websocketPort: 4001
lambdaPort: 4002
esbuild: ${self:custom.esbuild}
defaultCors:
origin: '*'
headers:
- Content-Type
- Authorization
- x-auth-token
provider:
name: aws
runtime: nodejs14.x
stage: ${opt:stage, 'dev'}
region: ${env:REGION, 'us-west-2'}
apiName: checkout-${self:provider.stage}
environment:
REGION: ${self:provider.region}
API_STAGE: ${self:provider.stage}
LAMBDA_PORT: ${self:custom.serverless-offline.lambdaPort}
LAMBDA_FUNCTION_PREFIX: ${self:service}-${self:provider.stage}
functions:
healthz:
handler: src/functions/healthz.handler
events:
- http:
path: /healthz
method: get
cors: true
sample:
handler: src/functions/sample.handler
timeout: 30
events:
- http:
path: /sample
method: ANY
cors: ${self:custom.defaultCors}
- http:
path: '/sample/{proxy+}'
method: ANY
cors: ${self:custom.defaultCors}
webhook:
handler: src/functions/webhook.handler
events:
- http:
path: /webhook
method: post
cors: true
lambda:
handler: src/functions/lambda.handler
timeout: 300