无法在ECS服务蓝/绿中启用EnableExecuteCommand

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

我有一个 ECS 服务(蓝色/绿色),我想执行容器,然后我尝试使用 aws cli 启用此服务中的

EnableExecuteCommand
:

aws ecs update-service --cluster **** --task-definition **** --service **** --enable-execute-command

但我得到:

An error occurred (InvalidParameterException) when calling the UpdateService operation: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment.

它告诉创建一个新的部署,但这没有意义,我在谷歌中搜索了很多,但找不到任何解决方案,也许这是不可能的?因为蓝色/绿色是由 aws codedeploy 管理的?

我在 aws 文档中发现了这个:

For services using the blue/green (CODE_DEPLOY) deployment controller, only the desired count, deployment configuration, health check grace period, task placement constraints and strategies, enable ECS managed tags option, and propagate tags can be updated using this API. If the network configuration, platform version, task definition, or load balancer need to be updated, create a new AWS CodeDeploy deployment. For more information, see CreateDeployment in the AWS CodeDeploy API Reference.
https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html

我想也许我可以在taskdef.json中设置它,但没有EnableExecuteCommand属性。

有人可以给我一些提示吗?

提前致谢。

amazon-web-services amazon-ecs aws-cli blue-green-deployment ecs-taskdefinition
1个回答
0
投票

不幸的是,一旦 ECS 服务配置为使用 CodeDeploy,目前无法启用该设置。

本教程适用于 ECS 和 CodeDeploy,展示了首先创建服务,然后再将 CodeDeploy 与服务结合使用。在创建服务时,您可以启用 ECS Exec 设置。

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