Add support for ASG launch event

This commit is contained in:
Stefan Reimer 2023-05-22 16:17:59 +00:00
parent bb13496ac3
commit d32ea3855a

2
app.py
View File

@ -251,7 +251,7 @@ def handler(event, context):
msg["ElastiCache:NodeReplacementScheduled"], msg["Start Time"], msg["End Time"])
# Basic ASG events
elif "Origin" in msg and msg["Origin"] == "AutoScalingGroup":
elif "Event" in msg and msg["Event"] in ["autoscaling:EC2_INSTANCE_TERMINATE", "autoscaling:EC2_INSTANCE_LAUNCH"]:
title = msg["Description"]
body = msg["Cause"]