运行aws ecs update-service --cluster cluster-name --service service-name --force-new-deployment --region ap-southeast-2
打开。
{
"service": {
"serviceArn": "arn:aws:ecs:ap-southeast-2:000000000000:service/service-name",
"serviceName": "service-name",
"clusterArn": "arn:aws:ecs:ap-southeast-2:000000000000:cluster/clustername",
"loadBalancers": [
{
"targetGroupArn": "arn:aws:elasticloadbalancing:ap-southeast-2:000000000000:targetgroup/targetgroupname",
"containerName": "containername",
"containerPort": 5000
}
],
"serviceRegistries": [],
"status": "ACTIVE",
"desiredCount": 1,
"runningCount": 1,
"pendingCount": 1,
"launchType": "FARGATE",
"platformVersion": "LATEST",
"taskDefinition": "arn:aws:ecs:ap-southeast-2:000000000000:task-definition/service-name:43",
:
并阻止我的外壳,直到我按 q
. 这曾经是工作就好了。我想我更新了我的AWSCLI,它导致了这一点。为什么会发生这种情况,我如何避免它在我的CI Scripts中更新我的服务?
是的,这是AWS CLI 2的默认行为。这应该可以解决你的问题(因为我不认为有一个内置的方法可以让它 "安静 "或沉默)。
aws ecs update-service --service svcName --desired-count 1 > devnull。
除非万不得已,我不建议回到旧版本。