Search code examples
amazon-web-servicesdockeraws-code-deploy

AWS CodeDeploy: stuck on install step


I'm running through this tutorial to create a deployment pipeline with my custom .net-based docker image.
But when I start a deployment, it's stuck on install phase, so I have to stop it manually: enter image description here

After that I get a couple of running tasks with different task definitions (note :1 and :4, 'cause I've tried to run deployment 4 times by now): enter image description here

They also change their state RUNNING->PROVISIONING->PENDING all the time. And the list of stopped tasks grows: enter image description here

Q: So, how to hunt down the issue with CodeDeploy? Why It's running forever?

UPDATE: It is connected to health checks.

UPDATE: I'm getting this:

(service dataapi-dev-service, taskSet ecs-svc/9223370487815385540) (port 80) is unhealthy in target-group dataapi-dev-tg1 due to (reason Health checks failed with these codes: [404]).

Don't quite understand, why is it failing for newly created container, 'cause the original one passes health-check.


Solution

  • While the ECS task is running, ELB (Elastic Load Balancer) will constantly do healthchecking the container as you config in the target group to check if the container is still responding.

    From your debug message, the container (api) responded the healthcheck path with 404.

    I suggest you config the healhcheck path in target group dataapi-dev-tg1.