forked from 3box/wreckingball
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
54 lines (49 loc) · 1.16 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
org: ukstv
app: aws-node-http-api-project
service: aws-node-http-api-project
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
runtime: nodejs16.x
timeout: 120
memorySize: 2048
constructs:
jobs:
type: queue
batchSize: 10
worker:
handler: src/handlers/consumer.consumer
timeout: 120
multistream:
type: queue
batchSize: 10
worker:
handler: src/handlers/multistream.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}