我的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
文件?
要指定不需要任何按需实例,可以使用SpotFleetOnDemandBase和SpotFleet OnDemandAboveBasePercentage:
-
SpotFleetOnDemandBase:当您的环境扩大时,您的"自动缩放"组在考虑Spot实例之前提供的最小随需应变实例数。
-
SpotFleetOnDemandAboveBasePercentage:按需实例的百分比,作为您的自动缩放组在SpotOnDemadBase实例之外提供的额外容量的一部分。
示例2中举例说明了选项的使用。具体而言,如果这两个选项都设置为0
,则不会使用按需实例。