-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
44 lines (39 loc) · 951 Bytes
/
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
service: html-to-pdf-api
plugins:
- serverless-bundle
- serverless-offline
custom:
bundle:
copyFiles:
- from: 'lib/*'
to: './'
- from: 'fonts/*'
to: './'
serverless-offline:
noPrependStageInUrl: true
useChildProcesses: true
useDocker: true
dockerReadOnly: false
package:
individually: false
provider:
name: aws
stage: ${opt:stage, 'local'}
region: ${file(./config.${self:provider.stage}.yml):REGION, 'ap-southeast-1'}
profile: ${file(./config.${self:provider.stage}.yml):PROFILE, 'default'}
runtime: nodejs12.x
memorySize: 256
timeout: 10
environment:
TZ: ${file(./config.${self:provider.stage}.yml):TZ, 'Asia/Manila'}
STAGE: ${self:provider.stage}
NODE_ENV: ${self:provider.stage}
FONTCONFIG_PATH: /var/task/fonts
functions:
convert:
handler: src/index.handler
events:
- http:
path: /
method: post
cors: true