Deleting a task definition revision using the console
If you decide that you no longer need a specific task definition revision in Amazon ECS, you
can delete the task definition revision so that it no longer displays in your
ListTaskDefinitions
API calls or in the console when you want to run a task
or update a service.
When you delete a task definition revision, it immediately transitions from the
INACTIVE
to DELETE_IN_PROGRESS
. Existing tasks and services
that reference a DELETE_IN_PROGRESS
task definition revision continue to run
without disruption.
You can't use a DELETE_IN_PROGRESS
task definition revision to run new tasks
or create new services. You also can't update an existing service to reference a
DELETE_IN_PROGRESS
task definition revision.
When you delete all INACTIVE
task definition revisions, the task definition name is not displayed in the console and not returned in the API. If a task definition revisions are in the DELETE_IN_PROGRESS
state, the task definition name is displayed in the console and returned in the API. The task definition name is retained by Amazon ECS and the revision is incremented the next time you create a task definition with that name.
To delete task definitions (Amazon ECS console)
You must deregister a task definition revision before you delete it. For more information, see Deregistering a task definition revision using the console.
Open the console at https://console.aws.amazon.com/ecs/v2
. -
From the navigation bar, choose the region that contains your task definition.
-
In the navigation pane, choose Task definitions.
-
On the Task definitions page, choose the task definition family that contains one or more revisions that you want to delete.
-
On the task definition Name page, select the revisions to delete, and then choose Actions, Delete.
-
Verify the information in the Delete window, and then choose Delete to finish.