I have two ECS services. UI(http://<LB>/SS_UI/
) and API(http://<LB>/webservice/
).
UI calls API and it's config file will have references to the API e.g.
public static springURL = "http://<LB>/webservice/"
The documentation for blue green deployment for ECS(https://cicd-pipeline-cdk-eks-bluegreen.workshop.aws/en/ecsbg/serviceupd.html) suggests creating two listener on the load balancer and two target groups
<LB>:80 -> Original set with live traffic
<LB>:8080 -> Replacement set for testing
This works if I want to test changes to individual projects. I commit to API. Old version of API is on port 80. New version is on port 8080. After testing http://<LB>:8080/webservice/
the switchover can happen after pre-defined time(pic)
But it doesn't work if I want to test from the UI because UI references the old version of API on port 80
If I commit changes to the UI project by referencing http://<LB>:8080/webservice/
, even though I can test from UI at http://<LB>:8080/SS_UI/
, I cannot allow the replacement set for UI to become the original set because API on port 8080 will eventually get deleted. How can I ensure that as soon as replacement set for API at port 8080 moves to port 80, the UI also starts referencing API of port 80?