【问题标题】:Service auto-scaling describe-scalable-targets not running服务自动缩放描述可扩展目标未运行
【发布时间】:2021-12-08 17:22:42
【问题描述】:

当前有一个集群,该集群具有基于此集群和负载均衡器/目标组创建的服务,通过在命令提示符中使用aws ecs create-service 创建它,并且在运行将我的可扩展目标描述为aws describe-scalable-targets --resource-ids (fargate-service/default/fargate-clustr) 的命令时,我收到一个错误syntax error, unexpected token '(' 所以我假设我在尝试描述目标时输入了错误的语法。

在下面链接的网站上告诉我服务自动缩放specifying the resource ID of the ECS service associated with the scalable target in Application Auto Scaling,我在我的 ECS 服务中找不到资源 ID?

我的范围是为我的集群中的任务创建自动缩放。

我遵循的可扩展目标命令 https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html#auto-scaling-IAM

注册目标命令:

    --service-namespace ecs \
    --scalable-dimension ecs:service:DesiredCount \
    --resrouce-id fargate-service/default/fargate-cluster \
    --min-capacity 1 \
    --max-capacity 10

【问题讨论】:

    标签: amazon-web-services amazon-ecs autoscaling aws-fargate


    【解决方案1】:

    正确的命令应该是:

    aws application-autoscaling  describe-scalable-targets --resource-ids fargate-service/default/fargate-clustr --service-namespace ecs
    

    【讨论】:

    • 运行时它返回一个空字符串,"Scalable Targets": [] 表示我没有设置目标,如更新后的帖子所示注册时,我执行该行代码并返回“调用 RegisterScalableTarget 操作时发生错误 (ValidationException):不支持的服务命名空间、资源类型或可扩展维度。”即使我定义了资源 ID 服务和集群。
    • @AaronD 也许你看错了地区。不过,如果我的回答有助于克服语法错误,我们将不胜感激。
    • 我还没有配置任何与区域有关的内容?
    • @AaronD 您使用 - - region 选项指定区域。如果没有帮助,请针对新问题提出新问题。
    • 我昨天发了一篇关于这个问题的帖子
    猜你喜欢
    • 2019-07-21
    • 2021-04-22
    • 2011-02-28
    • 1970-01-01
    • 1970-01-01
    • 2014-11-13
    • 2017-08-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多