我有一个在 AWS ECS 中运行的 Fargate 应用程序,我正在尝试通过 AWS CLI (aws-cli/1.16.96 Python/2.7.15 Darwin/18.0.0 botocore/1.12.86 ) 更新该应用程序。
我已经成功构建并推送了图像,并创建了新的任务定义版本。
当我尝试使用以下命令更新服务时:
aws ecs update-service
--cluster cluster-winquest-qa
--service container-qa-ge-service
--desired-count 0
Run Code Online (Sandbox Code Playgroud)
aws ecs update-service
--cluster cluster-qa
--service container-service
--task-definition first-run-task-definition:5
--platform-version "LATEST"
--desired-count 1
Run Code Online (Sandbox Code Playgroud)
抛出以下错误消息:
An error occurred (InvalidParameterException) when calling the UpdateService operation: Task definition does not support launch_type FARGATE
Run Code Online (Sandbox Code Playgroud)
然后我尝试将 --launch-type "FARGATE" 添加到上述命令中,构建以下命令:
aws ecs update-service
--cluster cluster-qa
--service container-service
--task-definition first-run-task-definition:5
--platform-version "LATEST"
--launch-type "FARGATE"
--desired-count 1
Run Code Online (Sandbox Code Playgroud)
它抛出:
Unknown options: --launch-type, FARGATE
我知道错误消息表明 …