Closed essa closed 1 year ago
Lifecycle hook waits for termination of all the tasks here.
But it is counting only RUNNING tasks. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/list_tasks.html
The default status filter is RUNNING
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html ECS Tasks becomes Stopping state before its termination.
So the lifecycle hook allows instance termination even if there are Stopping tasks which are processing requests.
Lifecycle hook waits for termination of all the tasks here.
But it is counting only RUNNING tasks. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/list_tasks.html
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html ECS Tasks becomes Stopping state before its termination.
So the lifecycle hook allows instance termination even if there are Stopping tasks which are processing requests.