-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
62 lines (57 loc) · 1.54 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
# NOTE: update this with your service name
service: pmb-plus-backend-poc2
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-webpack
- serverless-offline
# serverless-webpack configuration
# Enable auto-packing of external modules
custom:
stage: ${opt:stage, self:provider.stage}
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
serverless-offline:
port: 4000
environment: ${file(env.yml):${self:custom.stage}, file(env.yml):default}
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
environment:
db_user: ${self:custom.environment.db_user}
db_name: ${self:custom.environment.db_name}
db_password: ${self:custom.environment.db_password}
db_port: ${self:custom.environment.db_port}
db_host: ${self:custom.environment.db_host}
vpc:
securityGroupIds:
- sg-bf84a7f4
subnetIds:
- subnet-2490611a
- subnet-71832016
- subnet-bcef99f6
- subnet-020dae5e
# To load environment variables externally
# rename env.example to env.yml and uncomment
# the following line. Also, make sure to not
# commit your env.yml.
#
#environment: ${file(env.yml):${self:provider.stage}}
functions:
graphql:
handler: src/graphql.graphqlHandler
environment:
SLS_DEBUG: true
events:
- http:
path: graphql
method: post
cors: true
integration: lambda-proxy
- http:
path: graphql
method: get
cors: true
integration: lambda-proxy