为什么从 cli 运行 aws update-service 会导致弹出一个类似 vim 的窗口,期待一些输入?

问题描述 投票:0回答:1

运行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中更新我的服务?

bash aws-cli amazon-ecs
1个回答
1
投票

是的,这是AWS CLI 2的默认行为。这应该可以解决你的问题(因为我不认为有一个内置的方法可以让它 "安静 "或沉默)。

aws ecs update-service --service svcName --desired-count 1 > devnull。

除非万不得已,我不建议回到旧版本。

© www.soinside.com 2019 - 2024. All rights reserved.