【问题标题】:How can I specify that I only want Spot Instances for my Elastic Beanstalk application?如何指定我的 Elastic Beanstalk 应用程序只需要 Spot 实例?
【发布时间】:2020-07-08 18:26:52
【问题描述】:

我的env.yaml 有:

  aws:ec2:instances:
    InstanceTypes: g4dn.xlarge,c5.4xlarge,r5.2xlarge,r5a.xlarge
    EnableSpot: true
    SpotMaxPrice: "0.15"

但是当我做eb create时,它仍然问我:

Would you like to enable Spot Fleet requests for this environment?
(y/N): y
Enter a list of one or more valid EC2 instance types separated by commas (at least two instance types are recommended).
(Defaults provided on Enter):

为什么不尊重env.yaml 文件?

【问题讨论】:

    标签: amazon-web-services amazon-elastic-beanstalk spot-instances


    【解决方案1】:

    要指定您不需要任何按需实例,您可以使用SpotFleetOnDemandBaseSpotFleetOnDemandAboveBasePercentage

    • SpotFleetOnDemandBase:随着环境的扩展,您的 Auto Scaling 组在考虑使用 Spot 实例之前预置的最小按需实例数。

    • SpotFleetOnDemandAboveBasePercentage:按需实例的百分比,作为您的 Auto Scaling 组在 SpotOnDemandBase 实例之外预置的额外容量的一部分。

    选项的使用在Example 2 中举例说明。具体来说,如果两个选项都设置为0,则不会使用按需实例。

    【讨论】:

    • 我已经设置好了,当我进行 eb create 时,它​​仍然会询问我想要哪些实例类型。
    • @Shamoon 我认为您为现​​货车队提供它们,以便从首选类型中选择最便宜的景点。
    猜你喜欢
    • 1970-01-01
    • 2020-06-27
    • 2012-07-15
    • 2016-01-15
    • 2020-11-09
    • 2011-12-24
    • 2017-05-01
    • 1970-01-01
    • 2018-03-18
    相关资源
    最近更新 更多