-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
75 lines (70 loc) · 1.64 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
71
72
73
74
75
service: ceramic-benchmark-01
frameworkVersion: '3'
plugins:
- serverless-esbuild
- serverless-lift
custom:
esbuild:
minify: true
watch:
# anymatch-compatible definition (https://github.com/es128/anymatch)
pattern: ['./index.ts', 'src/**/*.ts'] # default .
ignore: ['.serverless/**/*', '.build'] # default ['.build', 'dist', 'node_modules']
provider:
name: aws
iam:
role:
statements:
- Effect: Allow
Action: 'cloudwatch:PutMetricData'
Resource: '*'
runtime: nodejs16.x
timeout: 120
memorySize: 2048
constructs:
jobs:
type: queue
batchSize: 30
maxBatchingWindow: 1
worker:
handler: src/handlers/consumer.consumer
timeout: 120
multistream:
type: queue
batchSize: 30
maxBatchingWindow: 1
worker:
handler: src/handlers/multistream.consumer
timeout: 120
composedb:
type: queue
batchSize: 30
maxBatchingWindow: 1
worker:
handler: src/handlers/composedb.consumer
timeout: 120
functions:
producerMultistream:
handler: src/handlers/multistream.trigger
events:
- httpApi:
method: post
path: /multistream
environment:
QUEUE_URL: ${construct:multistream.queueUrl}
producer:
handler: src/handlers/trigger.producer
events:
- httpApi:
method: post
path: /produce
environment:
QUEUE_URL: ${construct:jobs.queueUrl}
composedbTrigger:
handler: src/handlers/composedb.trigger
events:
- httpApi:
method: post
path: /composedbTrigger
environment:
QUEUE_URL: ${construct:composedb.queueUrl}