-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
53 lines (45 loc) · 1 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
service: aws-lambda-chromium-screenshot-api
frameworkVersion: "3"
provider:
name: aws
runtime: nodejs20.x
region: ap-south-1
memorySize: 1024
stage: production
timeout: 30
environment:
NODE_ENV: production
VERSION: v20.0
IS_OFFLINE: ${opt:isOffline, 'false'} # Handle local environment
# DEBUG: puppeteer:* # Enable debugging
plugins:
- serverless-esbuild
- serverless-offline
package:
exclude:
- node_modules/**
custom:
# serverless-offline:
# httpPort: 5000
esbuild:
bundle: true
minify: false
sourcemap: true
target: "node20"
define: { "require.resolve": "undefined" }
platform: "node"
concurrency: 10
functions:
server:
handler: src/index.handler
layers:
- arn:aws:lambda:xxxx:xxxxx:layer:chromium:xxx
events:
- http:
path: /
method: ANY
cors: true
- http:
path: /{proxy+}
method: ANY
cors: true