how to setup cloudwatch alarm for Autoscaling group when its scaling down Mincapacity Instances using cloudformation template.
I mean need alarm when all the Instances were "OutofService" basically this will happen when Instance failed ELB healthcheck.
Why don't you add an alarm based on the CloudTrail metric HealtlyHostCount
? If you set a low threshold, you will get warned when there are no healthy instances.
You can see the metrics documentation here