I have a service in ecs that is being deployed via code deploy (blue/green) I have configured it's rollback parameters to roll back "when a deployment fails". The issue I'm having is that it will attempt to deploy the app, the app will fail to deploy because something was miss configured in the new task definition (in taskdef.json), and continue trying to re-deploy it instead of just rolling back.
This doesn't seem right and the only other thing I can think to do is create an alarm that looks for a failing deployment but that also seems like something that setting the "roll back when a deployment fails" option should do for me. Not to mention creating that alarm doesn't actually seem straight forward either as there would be a few edge cases to it.
Any help appreciated.
Thanks