From bd14d352ebc78a9780265aa848ff9138cb524cbd Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Wed, 24 May 2023 10:40:43 +0000 Subject: [PATCH] Some more ElastiCache events --- app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app.py b/app.py index 7323802..773f043 100644 --- a/app.py +++ b/app.py @@ -250,6 +250,16 @@ def handler(event, context): body = "{} will be replaced between {} and {}".format( msg["ElastiCache:NodeReplacementScheduled"], msg["Start Time"], msg["End Time"]) + # ElasticCache replacement notifications + elif "ElastiCache:CacheNodeReplaceStarted" in msg: + title = "ElastiCache fail over stareted" + body = "for node {}".format(msg["ElastiCache:CacheNodeReplaceStarted"]) + + # ElasticCache replacement notifications + elif "ElastiCache:FailoverComplete" in msg: + title = "ElastiCache fail over complete" + body = "for node {}".format(msg["ElastiCache:FailoverComplete"]) + # Basic ASG events elif "Event" in msg and msg["Event"] in ["autoscaling:EC2_INSTANCE_TERMINATE", "autoscaling:EC2_INSTANCE_LAUNCH"]: title = msg["Description"]