My architecture goes like,
Internal ALB -> Target Group 1
\
-> Fargate Task (using ECS Service)
/
External ALB -> Target Group 2
This ECS service runs completely fine. I am able to hit the task using both the load balancers, for internal and external traffic.
I want to create a Blue/Green CodeDeploy Deployment Group corresponding to a CodeDeploy Application, that will successfully deploy the service whenever required. I am using CLI for all of this.
The problem is that since I am using two load balancers, I cannot associate both of them to create the CodeDeploy Deployment Group. Are there any pointers on how I can create this deployment group?
Also, I want to use this deployment group to create a pipeline so that the application can be deployed every time there is a code change.
Overall, I want to achieve that a service should be accessed internally within the VPC using internal ALB, and also externally using its public ALB. So I created both ALBs and created listeners for those ALBs, and then those target groups are attached to the ECS Service.