1

After deleting cloudformation stack,

below task definitions are still around in INACTIVE state:

enter image description here

I don't have the option to delete them explicitly.

Why cloudformation service does not delete these resources?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
overexchange
  • 15,768
  • 30
  • 152
  • 347
  • Does this answer your question? [How do you delete an AWS ECS Task Definition?](https://stackoverflow.com/questions/35045264/how-do-you-delete-an-aws-ecs-task-definition) – Adnan Mohib Mar 12 '20 at 04:59
  • How did it go? Still unclear why you can't do this? – Marcin Oct 29 '21 at 08:05

1 Answers1

4

There is no such thing as deleting a task definition. You can only de-register them and this is what cloudformation is doing. When task is de-registered it goes into INACTIVE state.

Docs write:

At this time, INACTIVE task definition revisions remain discoverable in your account indefinitely; however, this behavior is subject to change in the future, so you should not rely on INACTIVE task definition revisions persisting beyond the lifecycle of any associated tasks and services.

Marcin
  • 215,873
  • 14
  • 235
  • 294