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

1개 답변
0
수락된 답변

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
지원 엔지니어
답변함 일 년 전
  • Agree, or re-create service.. Via CLi you can also add a 2nd TG to an ECS Service too

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠