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
essentialso 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)?