how to update alb in ecs service

0

my ecs service need change a target group ,split from others but I cant find a area to change service alb target in update service page

preguntada hace un año838 visualizaciones
1 Respuesta
0
Respuesta aceptada

Hello xerphigh,

It is currently not possible to update the ECS service load balancer configurations using the ECS console. However, you can use the update-service CLI operation to perform the update.

You can use the below command to update the target group associated with your ECS service by passing the containerName, containerPort, and targetGroupArn values using the --load-balancers flag.

aws ecs update-service --cluster <cluster-name> --region <region> --service <ecs-service-name> --load-balancers '
[{
    "containerName": "<container-name>",
    "containerPort": <container-port>,
    "targetGroupArn": "<target-group-arn>"
}]
'

I hope this helps!

profile pictureAWS
INGENIERO DE SOPORTE
respondido hace un año
  • Agree, or re-create service.. Via CLi you can also add a 2nd TG to an ECS Service too

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas