4 ms·
CFn supports stack rollback alarms. All you need to do is create an alarm for failing ECS tasks.
by hahkerman 5y ago
CFn supports stack rollback alarms. All you need to do is create an alarm for failing ECS tasks.
- easton 5y agoIIRC, the problem was that rollbacks couldn’t start until it agreed that the service deployment had failed, which wouldn’t happen until I manually drained the task (or waited an unknown period for CF to timeout). You could click the rollback button but nothing would happen. I don’t think the alarm would’ve helped, but maybe I’m misunderstanding.
- hahkerman 5y agoI'm referring specifically to this feature: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-rollback-triggers.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGui... CFn will allow you to specify up to 5 alarms to monitor during stack deployment as well as a duration to monitor them for up to 3 hours. During deployment, the stack does not transition into the COMPLETE state until the monitor duration has completed without the alarms being triggered. If one of the alarms is triggered, the stack immediately rolls back. Since failed ECS tasks create CW Events, you can set up alarms on them and use them as the rollback monitor trigger.