3

In CloudFormation ECS when I update TaskDefinition tag Image:app:2 and make update-stack, I get only the one last new revision a myapp:2. How I can keep all previous revisions in which case manually rollback to previous revision?

Alebo
  • 31
  • 1
  • Partial solution - I just need create another one taskdefinition with another name which have one family group – Alebo Oct 28 '17 at 18:28
  • Have you looked at the versions in the task definitions dashboard on the ECS console. I believe previous versions of your task definitions must be present there. If you already looked and didn't find it there please do mention so in your question would be helpful while answering. – Piyush Baderia Apr 19 '19 at 19:52

1 Answers1

4

I just came across this problem, and since a while back you can specify an UpdateReplacePolicy on many CloudFormation resources, including a TaskDefinition, like this:

"Type": "AWS::ECS::TaskDefinition",
"UpdateReplacePolicy": "Retain",

And it will keep the old TaskDefinition revision which is useful rollback purposes.

Although this is a late answer, I found this post when searching for a solution so for anyone else hitting the same problem, there you go.

jishi
  • 858
  • 1
  • 11
  • 25