forked from fourTheorem/slic-watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
126 lines (110 loc) · 2.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
service: serverless-test-project
frameworkVersion: "3"
configValidationMode: error
variablesResolutionMode: 20210219
plugins:
- serverless-step-functions
- serverless-slic-watch-plugin
custom:
slicWatch:
topicArn: ${env:ALARM_TOPIC}
alarms:
Lambda:
Invocations:
enabled: true
Threshold: 10
SQS:
AgeOfOldestMessage:
Statistic: Maximum
enabled: true
Threshold: 60
InFlightMessagesPc:
Statistic: Maximum
Threshold: 1 # 1% = 1200 for regular queues or 180 for FIFO queues
provider:
name: aws
runtime: nodejs16.x
lambdaHashingVersion: 20201221
region: eu-west-1
stage: dev
endpointType: REGIONAL
functions:
hello:
handler: basic-handler.hello
slicWatch:
alarms:
Lambda:
Invocations:
Threshold: 2
ping:
handler: basic-handler.hello
slicWatch:
dashboard:
enabled: false
throttler:
handler: basic-handler.hello
reservedConcurrency: 0
driveStream:
handler: stream-test-handler.handleDrive
environment:
STREAM_NAME: { "Ref": stream }
driveQueue:
handler: queue-test-handler.handleDrive
driveTable:
handler: table-test-hander.handleDrive
streamProcessor:
handler: stream-handler.handle
events:
- stream:
type: kinesis
arn: { "Fn::GetAtt": [stream, Arn] }
startingPosition: LATEST
maximumRetryAttempts: 0
httpGetter:
handler: apigw-handler.handleGet
timeout: 30
events:
- http:
method: get
path: "item"
subscriptionHandler:
handler: apigw-handler.handleSubscription
timeout: 30
events:
- http:
method: post
path: "subscription"
eventsRule:
handler: rule-handler.handleRule
slicWatch:
alarms:
Lambda:
enabled: false
events:
- eventBridge:
pattern:
detail-type:
- Invoke Lambda Function
retryPolicy:
maximumEventAge: 60
maximumRetryAttempts: 2
resources: ${file(./sls-resources.yml)}
stepFunctions:
stateMachines:
workflow:
name: Workflow
definition: ${file(./state-machine.yml)}
loggingConfig:
level: ALL
includeExecutionData: true
destinations:
- Fn::GetAtt: [workflowLogGroup, Arn]
expressWorkflow:
name: ExpressWorkflow
type: EXPRESS
definition: ${file(./state-machine.yml)}
loggingConfig:
level: ALL
includeExecutionData: true
destinations:
- Fn::GetAtt: [expressWorkflowLogGroup, Arn]