-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
53 lines (47 loc) · 1.01 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
# REPLACE
# app and org for use with dashboard.serverless.com
service:
app:
org:
frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
stage: ${opt:stage}
memorySize: 512
region: us-west-2
lambdaHashingVersion: 20201221
apiGateway:
shouldStartNameWithService: true
resourcePolicy:
- Effect: Deny
Principal: '*'
Action: execute-api:Invoke
Resource:
- execute-api:/*/*/*
Condition:
NotIpAddress:
aws:SourceIp:
# Home IP
- 0.0.0.0
- Effect: Allow
Principal: '*'
Action: execute-api:Invoke
Resource:
- execute-api:/*/*/*
environment:
# Sample Environment Variable from AWS parameter store
SAMPLE_ENV: ${ssm:MONGODB_URI}
plugins:
- serverless-offline
custom:
serverless-offline:
httpPort: 3001
functions:
graphql:
handler: build/index.graphqlHandler
events:
- http:
path: graphql
method: POST
cors: true