This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Description
Hi,
I am running below command to create service in Fargate and enable service discovery for it. It works fine and my service is discoverable in my VPC.
ecs-cli compose --project-name backend service up --private-dns-namespace tutorial --vpc vpc-04deee8176dce7d7d --enable-service-discovery
I have to run this command from my CD pipeline so if there is any change in service it will automatically deploy new version of service. But when I run this command again. It gives below error.
Service Discovery can not be enabled on an existing ECS Service
Please let me know how I can fix this issue. I saw in console there is option to choose existing service discovery for service. But I couldn't fine any option in ecs-cli compose service up documentation for this.
If you need any other information please let me know.
ecs-cli version 1.19.1 (a20cf74)
aws cli version: aws-cli/2.0.20 Python/3.7.3 Linux/4.4.0-1109-aws botocore/2.0.0dev24
Regards
Shahbaz Sajjad