-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
executable file
·57 lines (57 loc) · 1.62 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
# https://medium.com/a-man-with-no-server/deploying-a-serverless-application-using-webpack-and-babel-to-support-es2015-to-aws-2f61cff8bafb
service: api-gateway
frameworkVersion: '>=1.21.0 <2.0.0'
provider:
name: aws
# https://statsbot.co/blog/a-crash-course-on-serverless-with-aws-running-node11-on-lambda/
# https://github.com/lambci/node-custom-lambda
# runtime: provided
runtime: nodejs8.10.0 # has to be >8 for Koa
stage: dev
region: us-west-1
# timeout: 10
plugins:
- serverless-webpack
- serverless-offline
# - serverless-domain-manager
custom:
serverless-offline:
port: 8000
webpack:
includeModules: true # if necessary
webpackConfig: 'scripts/webpack/webpack.handler.js'
# customDomain:
# domainName: api.nodejs.com
# stage: ci
# basePath: api
# certificateName: '*.nodejs.com'
# createRoute53Record: true
# endpointType: 'regional'
functions:
graphql:
handler: src/handler.graphql
events:
- http:
# https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html
path: '{proxy+}'
method: any
cors: true
# layers: # add layer
# - arn:aws:lambda:<region>:553035198032:layer:nodejs12:2
playground:
handler: src/handler.playground
events:
- http:
path: '/playground'
method: get
cors: true
# layers: # add layer
# - arn:aws:lambda:<region>:553035198032:layer:nodejs12:2
# usagePlan: # Optional usage plan config
# quota:
# limit: 50000
# offset: 2
# period: MONTH
# throttle:
# burstLimit: 200
# rateLimit: 100