Issue: You cannot start / stop your ECS task.
This article assume that you know how to connect to EC2 instance with ssh
Your EC2 instance was created with one of ECS optimized AMI images. Those image are bundle with ECS daemon and ECS docker
What is ECS agent?
ECS agent is a daemon which manages the ECS tasks. It pulls the docker of task, start it, stop it.
ECS agent comprise of
An ECS daemon
An ECS docker container
Where is the log of ECS agent?
The logs of ECS daemon
The logs of ECS docker container
Here you can see the log of pulling docker image for the ECS task, start/stop the container of those images
How to restart ECS agent?
sudo stop ecs
sudo start ecs
The ecs docker container is stopped / start automatically
you can check with docker ps
CONTAINERID IMAGE COMMAND
6db819ca3e1a amazon/amazon-ecs-agent:latest "/agent"
Delete checkpoint file.
If the logs says something about the checkpoint was fail, delete file
Where is ECS agent config?