Add support for ElastiCache replacement schedule notifications

This commit is contained in:
Stefan Reimer 2023-05-19 10:21:44 +00:00
parent 0d6ef359f5
commit bb13496ac3

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"]