The upside is that I got really well acquainted with how ECS worked.
The upside is that I got really well acquainted with how ECS worked.
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.
Our commitment to CloudFormation was doubled down on that we could do containers, Lambda, and 95% of any other AWS Services....
However, in hidsight using SAM and the ECS CLI probably would have resulted in a more predictable CI/CD process as we weren't fighting deploy semantics through CloudFormation abstraction.