We are using AWS ECS with launch type "Fargate" manage our containers. We have memory leak issues which we're actively investigating, however, in the meantime we need a solution to take down tasks that pass a certain memory threshold.
Using the AWS cli to run "update-service force-new-deployment" takes all the tasks down. We could target individual tasks using "aws ecs stop-task", however, I cannot find a metric in cloudwatch that gives us this task-specific information. We can only seem to find cluster or service level averages.
Any helps would be appreciated.