Add support for ElastiCache replacement schedule notifications
ZeroDownTime/sns-alert-hub/pipeline/head This commit looks good Details

This commit is contained in:
Stefan Reimer 2023-05-19 10:21:44 +00:00
parent 0d6ef359f5
commit bb13496ac3
1 changed files with 7 additions and 1 deletions

8
app.py
View File

@ -238,12 +238,18 @@ def handler(event, context):
except KeyError:
pass
# New simple ElasticCache notifications
# ElasticCache snapshot notifications
elif "ElastiCache:SnapshotComplete" in msg:
title = "ElastiCache Snapshot complete."
body = "Snapshot taken on {}".format(
msg["ElastiCache:SnapshotComplete"])
# ElasticCache replacement notifications
elif "ElastiCache:NodeReplacementScheduled" in msg:
title = "ElastiCache node replacement scheduled"
body = "{} will be replaced between {} and {}".format(
msg["ElastiCache:NodeReplacementScheduled"], msg["Start Time"], msg["End Time"])
# Basic ASG events
elif "Origin" in msg and msg["Origin"] == "AutoScalingGroup":
title = msg["Description"]