-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
57 lines (42 loc) · 945 Bytes
/
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
service: event-bridge-datasource
frameworkVersion: '3'
configValidationMode: error
plugins:
- serverless-appsync-plugin
provider:
name: aws
region: us-east-1
appSync:
name: momento-appsync
logging:
level: ALL
xrayEnabled: true
authentication:
type: API_KEY
apiKeys:
- name: Default
substitutions:
token: ${file(momento.js):getMomentoApiKey}
dataSources:
wikipedia:
type: HTTP
config:
endpoint: 'https://en.wikipedia.org'
momento:
type: HTTP
config:
endpoint: ${file(momento.js):getMomentoUrl}
resolvers:
Query.wikipedia:
functions:
- getCacheItem
- dataSource: wikipedia
code: resolvers/wikipedia.js
- putCacheItem
pipelineFunctions:
getCacheItem:
code: resolvers/getCacheItem.js
dataSource: momento
putCacheItem:
code: resolvers/putCacheItem.js
dataSource: momento