0

In an AWS autoscaling group, I can configure notifications for instance launch and terminate actions and error variations of the 2, but is there any way to configure a notification when a group is created / destroyed?

Brett
  • 221
  • 3
  • 11
  • If you are using AWS SNS, and you have subscribed to a topic, you will receive it's notifications based on the actions, or you could use lifecycle notifications as stated in this [document](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html). – Alin Andrei Oct 03 '16 at 09:48
  • I'm using SNS. I get a test notification when a group is created and notifications for instances starting and being terminated. But there is no "Group is being shut down" notification - all notifications besides the test are instance-centric, not group-centric. In the same way, ASG lifecycle hooks are based on INSTANCE lifecycle phases and do not alert to GROUPS being created / destroyed. – Brett Oct 03 '16 at 09:56
  • This is weird indeed, after some researching, it seems ASG doesn't send notification if the group is being shut down only the ec2 instances, do you have cloud trail enabled ? can you see if there anything there regarding ASG ? – Alin Andrei Oct 03 '16 at 12:22
  • Ah yes, thanks for the suggestion Alin - looking into that now. – Brett Oct 03 '16 at 13:28

1 Answers1

1

As mentioned in the comments, there is no way to have the ASG itself notify you.

You would need to have a cloudwatch event trigger off of the DeleteAutoScaling Group or CreateAutoScalingGroup API calls.

From the Cloudwatch events console: - Create Rule - Select Auto Scaling as the service - AWS API Call via CloudTrail - Specific operation(s) - The API calls you want - Add an SNS topic as the target

Shahad
  • 326
  • 1
  • 6