【发布时间】:2019-07-26 04:36:14
【问题描述】:
我有一个在 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
aws ecs update-service
--cluster cluster-qa
--service container-service
--task-definition first-run-task-definition:5
--platform-version "LATEST"
--desired-count 1
抛出以下错误信息:
An error occurred (InvalidParameterException) when calling the UpdateService operation: Task definition does not support launch_type FARGATE
然后我尝试将 --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
它抛出:
Unknown options: --launch-type, FARGATE
我知道错误消息说 Fargate 应用程序不支持任务定义,但我想知道如何使用 AWS CLI 将服务更新到最新的任务定义版本。我将不胜感激任何帮助。谢谢。
【问题讨论】:
标签: amazon-web-services aws-cli amazon-ecs