@liflig/cdk 2.10.4 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,6 +19,11 @@ def handler(event, context):
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def send_slack_notification(message, region):
|
|
22
|
+
alarm_emojis = {
|
|
23
|
+
"ALARM": ":rotating_light:",
|
|
24
|
+
"INSUFFICIENT_DATA": ":warning:",
|
|
25
|
+
"OK": ":white_check_mark:"
|
|
26
|
+
}
|
|
22
27
|
if (message['NewStateValue'] == "ALARM"):
|
|
23
28
|
color = "danger"
|
|
24
29
|
else:
|
|
@@ -27,7 +32,7 @@ def send_slack_notification(message, region):
|
|
|
27
32
|
attachments = [{
|
|
28
33
|
'color': color,
|
|
29
34
|
'title_link': "https://console.aws.amazon.com/cloudwatch/home?region=" + region + "#alarm:alarmFilter=ANY;name=" + message['AlarmName'],
|
|
30
|
-
'fallback': f"{message['AlarmName']}: {alarm_description}",
|
|
35
|
+
'fallback': f"{alarm_emojis.get(message['NewStateValue'], '')} {message['AlarmName']}: {alarm_description}",
|
|
31
36
|
'fields': [
|
|
32
37
|
{'title': 'Alarm Name',
|
|
33
38
|
'value': message['AlarmName'], 'short': False},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liflig/cdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "CDK library for Liflig",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@commitlint/cli": "17.
|
|
37
|
+
"@commitlint/cli": "17.5.1",
|
|
38
38
|
"@commitlint/config-conventional": "17.4.4",
|
|
39
39
|
"@aws-cdk/assert": "2.62.0",
|
|
40
|
-
"@types/aws-lambda": "8.10.
|
|
40
|
+
"@types/aws-lambda": "8.10.114",
|
|
41
41
|
"@types/jest": "27.5.2",
|
|
42
|
-
"@types/node": "18.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
44
|
-
"@typescript-eslint/parser": "5.
|
|
42
|
+
"@types/node": "18.15.11",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "5.58.0",
|
|
44
|
+
"@typescript-eslint/parser": "5.58.0",
|
|
45
45
|
"aws-cdk": "2.62.0",
|
|
46
46
|
"aws-cdk-lib": "2.62.0",
|
|
47
|
-
"constructs": "10.1.
|
|
48
|
-
"eslint": "8.
|
|
49
|
-
"eslint-config-prettier": "8.
|
|
47
|
+
"constructs": "10.1.307",
|
|
48
|
+
"eslint": "8.38.0",
|
|
49
|
+
"eslint-config-prettier": "8.8.0",
|
|
50
50
|
"eslint-plugin-prettier": "4.2.1",
|
|
51
51
|
"husky": "8.0.3",
|
|
52
52
|
"jest": "27.5.1",
|
|
53
53
|
"jest-cdk-snapshot": "2.0.1",
|
|
54
|
-
"prettier": "2.8.
|
|
55
|
-
"semantic-release": "20.1.
|
|
54
|
+
"prettier": "2.8.7",
|
|
55
|
+
"semantic-release": "20.1.3",
|
|
56
56
|
"ts-jest": "27.1.5",
|
|
57
57
|
"ts-node": "10.9.1",
|
|
58
58
|
"typescript": "4.9.5"
|