CodeDeploy stuck on install step when deploying ECS service

52 views Asked by At

I'm trying to deploy ECS cluster service with CodeDeploy.

I have 2 containers container-1(listens 5001 port), container-2(listens 5002 port) in my ECS service(Both are the same except for the port) and uses EC2 launch type for ECS.

As I'd like to use Blue/Green deployment strategy, so configured ALB that has 2 listeners

  • for 80 Port (100% weight for container-1-target-group, 0% weight for container-2-target-group)
  • for 443 Port (100% weight for container-1-target-group, 0% weight for container-2-target-group)

and container-1-target-group has 5001 port and container-2-target-group has 5002 port. Both target groups have HEALTHY status on each port.

And here's my appspec.yml

version: 0.0
Resources:
  - TargetService:
      Type: AWS::ECS::Service
      Properties:
        TaskDefinition: "arn:aws:ecs:MY_REGION:MY_TASK_DEFINITION_WITH_CORRECT_VERSION"
        LoadBalancerInfo:
          ContainerName: "container-1"
          ContainerPort: 5001
        PlatformVersion: null

But I don't know why CodeDeploy stuck on install step. PRIMARY(blue) task set has 100% traffic but ACTIVE(green) task set has 0% and is waiting for 1 running state.

Thanks in advance.

I've tried strategies like CodeDeploy.AllAtOnce and 10PercentPer1Minute but both stuck on install step.

0

There are 0 answers