-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathserverless.yml
executable file
·75 lines (69 loc) · 1.64 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
service: serverless-lambda-puppeteer
frameworkVersion: "1.64.0"
package:
individually: true
provider:
name: aws
versionFunctions: false
runtime: nodejs12.x
region: us-east-1
stage: dev
profile: ${env:PROFILE}
memorySize: 2048
environment:
UPLOAD_BUCKET: XXXXX
S3_ACCESS_KEY: ${env:S3_ACCESS_KEY}
S3_SECRET_KEY: ${env:S3_SECRET_KEY}
BROWSERLESS_PATH: ${env:BROWSERLESS_PATH}
apiGateway:
binaryMediaTypes:
- "application/pdf"
iamRoleStatements:
- Effect: Allow
Action:
- "s3:GetObject"
- "s3:PutObject"
Resource:
- arn:aws:s3:::${self:provider.environment.UPLOAD_BUCKET}/*
plugins:
- serverless-webpack
- serverless-offline
- serverless-dotenv-plugin
- serverless-apigw-binary
- serverless-apigwy-binary
custom:
webpack:
webpackConfig: webpack.config.js
includeModules: true
packager: "yarn"
apigwBinary:
types:
- "application/pdf"
serverless-offline:
location: .webpack/service
functions:
run-puppeteer:
handler: functions/puppet-master.generate
timeout: 600
events:
- http:
path: scrape-sushi
method: post
timeout: 600
# async: true
cors: true
parameters:
headers:
Accept: "application/json"
download-metamask:
handler: functions/metamask-download.generate
timeout: 30
events:
- http:
path: metamask-download
method: post
timeout: 30
cors: true
parameters:
headers:
Accept: "application/json"