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