containers-roadmap icon indicating copy to clipboard operation
containers-roadmap copied to clipboard

[ECS] [request]: Delete task definitions

Open lawrencepit opened this issue 5 years ago • 101 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request Currently it is possible to deregister a task definition, after which its status becomes INACTIVE. However the task definition is still discoverable indefinitely. Old task definitions (in our case they are many years old) may contain sensitive information (added before the time SSM and Secrets Manager were available).

Which service(s) is this request for? ECS

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? We wish to permanently delete old task definitions that may contain sensitive information.

Are you currently working around this issue? Impossible.

lawrencepit avatar Jan 08 '20 23:01 lawrencepit

We moved a lot of sensitive data from plain text environment variables to SSM Parameter Store. But in old revisions the variables still available to read in plaintext even if the revision was deactivated. Our development team has access to ECS Task Definitions but do not have access to SSM Parameter Store and to KMS keys. So, the issue has potential security risks for us.

ghost avatar Feb 03 '21 12:02 ghost

Im facing this issue right now..

lucazin avatar Mar 10 '21 18:03 lucazin

same here

007vasy avatar Jun 10 '21 03:06 007vasy

Frustrating!! Please consider it.

black13spell avatar Jun 24 '21 06:06 black13spell

Six years should be enough to implement 'delete' function, am I wrong?

carellen avatar Jul 21 '21 10:07 carellen

Still waiting for this feature.

simbrams avatar Aug 03 '21 12:08 simbrams

Please consider this feature request. It would be more than valuable to have this feature.

colinbut avatar Aug 09 '21 21:08 colinbut

WORKAROUND - deregister all versions of a task definition and it will disappear from the console

dadvir avatar Aug 15 '21 15:08 dadvir

@dadvir that is correct, but be please aware that if you register the task with the same task definition name (family), it will recreate the task - and bump the revision up one from the previous one that existed, and not start at Task Definition Name:1

maishsk avatar Aug 16 '21 14:08 maishsk

As @vitaliy-kravchenko mentioned it's problematic that configuration in task definitions is in plaintext and it's completely impossible to delete from the account.

@dadvir @maishsk, deregistering has some benefits, but the task definitions simply move to the "INACTIVE" status and tab in the console. None of the information is deleted.

Please add functionality for deleting task definitions for good.

brycesteinhoff avatar Aug 19 '21 07:08 brycesteinhoff

Even if I delete the CloudFormation stack, the TaskDefinitions remain though are inactive. I want to get rid of them. Thus, 👍

andriyzhurba avatar Sep 16 '21 09:09 andriyzhurba

Not only do they expose sensitive information, but inactive/undeleted tasks clutter the AWS resource count. It can make it hard to use Tag editor. That blue line is only because of task definitions. Resource Count in Production Account .

emmanuelnk avatar Sep 18 '21 16:09 emmanuelnk

Please update this. This ticket is nearly two years old and should have been something towards the top of the backlog as it leave security vulnerabilities.

Syntactical01 avatar Oct 07 '21 20:10 Syntactical01

Please resolve this 👍

sr-murthy avatar Oct 15 '21 09:10 sr-murthy

It is hard to believe that deleting of the task is not possible.

vasili111 avatar Oct 30 '21 02:10 vasili111

Please resolve this +1

juniorro avatar Nov 02 '21 17:11 juniorro

Can you please update if there is a plan to fix this?

ahmedsuleman avatar Nov 03 '21 10:11 ahmedsuleman

just wanted to delete inaction task definitions, please resolve this + 1

zarr12steven avatar Nov 04 '21 09:11 zarr12steven

task definition deletion is mandatory. Hard to believe it is so hard to get this implemented. +100

timowilson-fluke avatar Nov 04 '21 20:11 timowilson-fluke

Please set up config to delete task definitions.

cgustave897 avatar Nov 07 '21 21:11 cgustave897

PLEASE ADD THE DELETE THINGY.

azrulaham2020 avatar Nov 09 '21 04:11 azrulaham2020

I have created many tasks for practicing purposes now I can't remove them and its looking junks, PLEASE ADD DELETE OPTION

kshafin avatar Nov 14 '21 16:11 kshafin

I work with some of the people at AWS, they have said they will never be implementing this feature because it doesn't make them any money!

ughstudios avatar Nov 21 '21 21:11 ughstudios

With an attitude like that, while it won't make them any money to implement it, they will start to loose money as people migrate to other providers that will listen to their customers.

timowilson-fluke avatar Nov 21 '21 23:11 timowilson-fluke

We need this delete button...

rudral avatar Nov 22 '21 05:11 rudral

I know it's frustrating when issues are not being engaged but rest assured we read them all (and all their comments). We tend to post when there is value to add and not just "thanks for your patient, we are considering it".

So first off, thanks for your patient, we are considering it (but there isn't any material additional information we can provide at the moment). Perhaps the issue itself requires a bit more context because it's easy to think that it could be resolved by adding a delete button. ECS is a very sophisticated multi-tenant control plane and deleting a task definition entirely has a number of ramifications that are not immediately evident from a consumption perspective. I am not saying it's impossible to implement this workflow but it's more complex than just adding a api verb or ui element to the interface. We totally understand the need for this feature and @emmanuelnk has a great example mid-thread re why that is (thanks). I am not suggesting you stop posting that you need this feature but please rest assured that, if we do not respond, we are not ignoring the issue (or any other issue for that matter).

mreferre avatar Nov 22 '21 14:11 mreferre

.. been using Task Definitions wrong for years .. but have learned that it's "only" possible to have 1 million Task Definition versions under each family-prefix .. Have also learned that these counts as resources and will half a million of them will increase the cost of running Config by about $1100 a month ..

so, I got that going for me.

I'd like to be able to delete task definitions, though .. I'd really like that.

klang avatar Nov 29 '21 12:11 klang

I made a task definition to test things out. Now I'm stuck with it.

paulschreiber avatar Dec 07 '21 23:12 paulschreiber

I made a task definition to test things out. Now I'm stuck with it, AS WELL

DroidUnknown avatar Dec 10 '21 07:12 DroidUnknown

Adding another comment on why this is important: I'm currently building a system that involves running a large number of heterogenous temporary tasks on heterogenous temporary containers (starting at "dozens per day" and possibly going up dramatically in the future.) I'd like to use ECS because it seems like the system intended for this. But it turns out it's just not suited; every time we spawn a new temporary task, it will impose an eternal monthly cost on it by leaving a task definition hanging around that we can't ever remove.

In our case, this isn't "please implement this, we have tasks we want to get rid of". This is "this missing feature made ECS useless for us, so we either need to do this by hand via EC2 or move to Azure", and we're currently trying to figure out the best approach.

zorbathut avatar Dec 14 '21 23:12 zorbathut