-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
42 lines (42 loc) · 1.37 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
org: merlin2010
app: subasta
service: auction-server
custom:
# Our stage is based on what is passed in when running serverless
# commands. Or fallsback to what we have set in the provider section.
stage: ${opt:stage, self:provider.stage}
# Load our secret environment variables based on the current stage.
# Fallback to default if it is not in prod.
environment: ${file(env.yml):${self:custom.stage}}
provider:
name: aws
runtime: nodejs10.x
region: ${self:custom.environment.aws.${self:custom.stage}.region}
vpc:
securityGroupIds:
- ${self:custom.environment.aws.${self:custom.stage}.securityGroup}
subnetIds:
- ${self:custom.environment.aws.${self:custom.stage}.subnet1}
- ${self:custom.environment.aws.${self:custom.stage}.subnet2}
environment:
NODE_ENV: production
privateKey: ${self:custom.environment.security.${self:custom.stage}.privateKey}
publicKey: ${self:custom.environment.security.${self:custom.stage}.publicKey}
password: ${self:custom.environment.security.${self:custom.stage}.password}
functions:
graphql:
# this is formatted as <FILENAME>.<HANDLER>
handler: src/graphql.handler
events:
- http:
path: graphql
method: post
cors: true
- http:
path: graphql
method: get
cors: true
- http:
path: playground
method: get
cors: true