We are trying to create a service with the specified task definition using the create-service command of aws ecs cli. Our task definition is people-cloud:27.
aws ecs create-service --cluster cloud1 --service-name docker-service --task-definition people-cloud:27
--load-balancers targetGroupArn=arn:aws:elasticloadbalancing:ap-south-1:2******5555:targetgroup/ecsCloud/ee7f4c280b1672aa,containerName=app,containerPort=8080,targetGroupArn=arn:aws:elasticloadbalancing:ap-south-1:2******5555:targetgroup/ecsServer/54fcbf7052957660,containerName=app2,containerPort=2990
--launch-type FARGATE --client-token AMOEBA@123 --desired-count 1 --network-configuration "awsvpcConfiguration={subnets=[subnet-0e11****f9e4218,subnet-0er****ufgrger],securityGroups=[sg-******5b***b3]}"
The command mentions that it can take multiple load balancers as input but when we provide them in comma separated format only the last one is taken into account.
In this case only one that is attached to app2 container is published in the output. Need help on this how to provide multiple load balancer information in the cli command.