I created an ECS cluster with AWS copilot and it was working fine. At a particular time, I got a 503 service unavailable error and found out that target group to which the Load balancer is pointing doesnt have any registered targets. It happened abruptly and no targets were removed manually. But at the same time there are tasks running under the service and we can scale up the tasks. But the created tasks are not found registered under the target groups.
Later I manually registered the targets for the target groups.
Auto scaling is given for 0-4. But even when new tasks are added, the new tasks are not added to the target groups. Inly the manually added single task is available in the target group.
I tried redeploying the service. For some reason, deploying completed successfully without any new revision created.
Is there any way to reactivate the automatic registration of targets to the target groups
To put some context, this 503 happened while I was fiddling with the load balancer
listeners and later found there are no active targets registered.
Requesting your kind advice and suggestions on this