Posted On: Mar 1, 2023
Amazon Elastic Container Service (Amazon ECS) now enables customers to delete inactive task definition revisions programmatically or via the Amazon ECS console. With this new capability, customers can permanently delete task definition revisions that are no longer needed or contain undesirable configurations, simplifying their resource management and improving security posture.
A task definition serves as the blueprint for running tasks and services on Amazon ECS. Customers can update task definitions to create new revisions, and deregister old revisions that are no longer needed. Deregistered task definition revisions are marked INACTIVE by Amazon ECS and cannot be used for creating new services or running standalone tasks. While deregistration makes it easier for customers to disregard INACTIVE task definition revisions, these resources could pile up over time. Starting today, customers can use a new DeleteTaskDefinitions API or the Amazon ECS console to submit a list of INACTIVE task definition revisions for deletion. ECS will delete the submitted revisions that are not associated with any active tasks, and is designed to retry deletion for the remaining ones, eventually deleting them when all associated tasks have stopped. Customers can track the deletion status using the Amazon ECS Console or the DescribeTaskDefinitions API.
The new functionality is now available in Amazon Web Services China (Beijing) Region, operated by Sinnet and Amazon Web Services China (Ningxia) Region, operated by NWCD. To learn more, see user guide and API reference.