Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

executable file 88 lines (81 sloc) 2.8 KB
service: ${file(./secrets.json):ApiName}
provider:
name: aws
region: us-east-1
stage: dev
memorySize: 256
runtime: nodejs8.10
role: LambdaRole
environment:
#aurora
AURORA_HOST: ${self:custom.AURORA.HOST}
AURORA_PORT: ${self:custom.AURORA.PORT}
#mysql
MYSQL_HOST: ${self:custom.MYSQL.HOST}
MYSQL_PORT: ${self:custom.MYSQL.PORT}
#postgresql
POSTGRESQL_HOST: ${self:custom.POSTGRESQL.HOST}
POSTGRESQL_PORT: ${self:custom.POSTGRESQL.PORT}
#common
DB_NAME: ${self:custom.DB_NAME}
USERNAME: ${self:custom.USERNAME}
PASSWORD: ${self:custom.PASSWORD}
custom:
DB_NAME: graphql
USERNAME: master
PASSWORD: password
AURORA:
HOST:
Fn::GetAtt: [AuroraRDSCluster, Endpoint.Address]
PORT:
Fn::GetAtt: [AuroraRDSCluster, Endpoint.Port]
VPC_CIDR: 10
MYSQL:
HOST:
Fn::GetAtt: [MySqlRDSInstance, Endpoint.Address]
PORT:
Fn::GetAtt: [MySqlRDSInstance, Endpoint.Port]
POSTGRESQL:
HOST:
Fn::GetAtt: [PostgreSqlRDSInstance, Endpoint.Address]
PORT:
Fn::GetAtt: [PostgreSqlRDSInstance, Endpoint.Port]
plugins:
- serverless-pseudo-parameters
resources:
Resources:
LambdaRole: ${file(./resource/LambdaRole.yml)}
ServerlessInternetGateway: ${file(./resource/ServerlessInternetGateway.yml)}
ServerlessVPC: ${file(./resource/ServerlessVPC.yml)}
ServerlessVPCGA: ${file(./resource/ServerlessVPCGA.yml)}
ServerlessSubnetA: ${file(./resource/ServerlessSubnetA.yml)}
ServerlessSubnetB: ${file(./resource/ServerlessSubnetB.yml)}
ServerlessSubnetC: ${file(./resource/ServerlessSubnetC.yml)}
ServerlessSubnetGroup: ${file(./resource/ServerlessSubnetGroup.yml)}
ServerlessSecurityGroup: ${file(./resource/ServerlessSecurityGroup.yml)}
RouteTablePublic: ${file(./resource/RouteTablePublic.yml)}
RoutePublic: ${file(./resource/RoutePublic.yml)}
RouteTableAssociationSubnetA: ${file(./resource/RouteTableAssociationSubnetA.yml)}
RouteTableAssociationSubnetB: ${file(./resource/RouteTableAssociationSubnetB.yml)}
RouteTableAssociationSubnetC: ${file(./resource/RouteTableAssociationSubnetC.yml)}
AuroraRDSClusterParameter: ${file(./resource/AuroraRDSClusterParameter.yml)}
AuroraRDSInstanceParameter: ${file(./resource/AuroraRDSInstanceParameter.yml)}
AuroraRDSCluster: ${file(./resource/AuroraRDSCluster.yml)}
AuroraRDSInstance: ${file(./resource/AuroraRDSInstance.yml)}
MySqlRDSInstance: ${file(./resource/MySqlRDSInstance.yml)}
PostgreSqlRDSInstance: ${file(./resource/PostgreSqlRDSInstance.yml)}
functions:
graphql:
handler: handler.server
events:
- http:
path: /
method: post
cors: true
playground:
handler: handler.playground
events:
- http:
path: /
method: get
cors: true
You can’t perform that action at this time.