-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.yml
70 lines (64 loc) · 1.42 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
63
64
65
66
67
68
69
70
service: serverless-apollo-datasource-dynamodb
frameworkVersion: ">=1.21.0 <2.0.0"
provider:
profile: ${opt:stage}
name: aws
runtime: nodejs8.10
stage: ${opt:stage}
region: ${opt:region}
iamRoleStatements:
- Effect: "Allow"
Action:
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource:
- "*"
environment:
SERVERLESS_PROJECT: serverless-apollo-datasource-dynamodb
SERVERLESS_STAGE: ${opt:stage}
SERVERLESS_REGION: ${opt:region}
AWS_XRAY_CONTEXT_MISSING: LOG_ERROR
# SLS_DEBUG: true
plugins:
- serverless-dynamodb-local
- serverless-webpack
- serverless-offline
custom:
serverless-offline:
port: 4200
webpackIncludeModules: true
dynamodb:
noStart: false
start:
# host: localhost
port: 8000
sharedDb: true
migrate: true
seed: false
functions:
graphql:
handler: handler.graphqlHandler
events:
- http:
path: graphql
method: post
cors: true
- http:
path: graphql
method: get
cors: true
Resources:
psqTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
Properties:
TableName: psq
AttributeDefinitions:
- AttributeName: id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1