3

I know this isn't possible through the AWS portal, but we have a scenario where we would like to restart a container that may have died, which isn't essential.

The scenario is along the lines of having a task with half a dozen or so containers, one of which is a container who's only responsibility is to report metrics for the rest of the task. Sometimes this container crashes due to memory allocation errors or something else.

The only options we have right now in this scenario are:

  • Mark the metrics container as essential so that it will force the entire task (including itself) to restart if it crashes
  • Mark the metrics container as not essential, resulting in it remaining down indefinitely if it crashes, until the task is at some time restarted.

Is there a way that I can start the container back up from the local host so that it will come up and reattach itself to the ecs_agent container (so that AWS can continue monitoring it)?

MrDuk
  • 295
  • 2
  • 8
  • Did you consider separating the task into 2? if they are truly decoupled - it would make sense to run the "reporting" container as an isolated service (Service rather than Task). I saw your SO question about missing documentation, so it might be better to avoid non documented of bleeding edges – orberkov Sep 22 '18 at 01:33
  • Wouldn't just killing the specific container and letting ECS restart it resolve the issue? – Uberhumus Oct 12 '19 at 14:54
  • Could you reply to the comment? – 030 Dec 23 '19 at 09:23

0 Answers0