From bb13496ac357332f2391a8507a337bd8f6985d44 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Fri, 19 May 2023 10:21:44 +0000 Subject: [PATCH] Add support for ElastiCache replacement schedule notifications --- app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index e4b66ae..9872498 100644 --- a/app.py +++ b/app.py @@ -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"]