- Newest
- Most votes
- Most comments
I understand that you are trying to setup a mechanism where a boto3 ECS waiter function to wait until a Fargate task is Stopped. So whenever you are running “ecs.describe_tasks” boto3 method and randomly running in to an issue where the task with a specific task Id is reported as MISSING. Now, I assume that you are essentially trying to obtain Describe task API output to find out if the task is stopped(completed) or to find out if it has failed. Now, when a task is stopped, the details of the task are available for review by Describe task only for a certain amount of time. At the moment, ECS does not have a fixed time as to when the Stopped task details are reaped(details unavailable for retrieval) using the Describetask API.
For example, it is expected that a DescribeTask API can return a response that the task is MISSING even shortly after the task is Stopped. Because the task details in some cases/scenarios can be removed(for retrieval) by ECS as early as minutes and sometimes can stay for an hour(approximately).
To answer you question as to what does the MISSING status mean?
In addition to the obvious reasons where the task ID/region/Cluster name are incorrect. You could also see the MISSING status for a task ID when that specific Task has been stopped and ECS had reaped this stopped task. Based on the information that you have shared with me and considering that the issue is intermittent, this could be main reason you are observing some tasks showing up as MISSING status.
Now I understand that you might be able to view these stopped tasks in the console which ideally you should not be able to view if the Describe task API call is showing the task’s status as MISSING. In such case, I would suggest that you open a support case with AWS Premium Support to troubleshoot the issue further as we would need cluster/task related information.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 3 months ago