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 年前檢視次數 952 次
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
支援工程師
已回答 1 年前
  • Agree, or re-create service.. Via CLi you can also add a 2nd TG to an ECS Service too

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南