How to restart containers in AWS ECS?

Nick picture Nick · Apr 8, 2017 · Viewed 13.2k times · Source

I have provided application configuration via consul's key-value store to the application containers running in ECS services.

The application reads its configuration from consul only once on start up.

When I need to change the configuration, how should I go about restarting the containers so that the application configuration is refreshed?

I am hoping to do this programmatically via the aws cli.

Answer

Mitch Dempsey picture Mitch Dempsey · Apr 13, 2017

You don't restart containers. You can however stop the individual tasks, and ECS will respawn another instance of your task somewhere on the cluster.