简体   繁体   English

具有 Spot 实例的 CloudFormation LaunchTemplate AutoScaling 组

[英]CloudFormation LaunchTemplate AutoScaling group with Spot instances

I'm creating a CloudFormation template to deploy an autoscaling group that should only use spot instances.我正在创建一个 CloudFormation 模板来部署一个仅应使用 Spot 实例的自动缩放组。 The Cloudformation throws an error with this template. Cloudformation 使用此模板引发错误。 What's wrong here?这里有什么问题?

Error: CREATE_FAILED Encountered unsupported property InstancesDistribution错误:CREATE_FAILED 遇到不受支持的属性 InstancesDistribution

 { "Resources": { "testasg": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { "LaunchTemplate": { "LaunchTemplateId": "lt-0c8090cd4510eb25e", "Version": "1" }, "MaxSize": "10", "MinSize": "2", "DesiredCapacity": "2", "VPCZoneIdentifier": [ "subnet1", "subnet2" ], "MaxInstanceLifetime": 86400, "InstancesDistribution": { "OnDemandAllocationStrategy": "lowest-price", "OnDemandBaseCapacity": 0, "OnDemandPercentageAboveBaseCapacity": 0, "SpotAllocationStrategy": "lowest-price", "SpotInstancePools": 2 }, "NewInstancesProtectedFromScaleIn": false, "TerminationPolicies": [ "OldestInstance" ], "Tags": [ { "Key": "Cluster", "Value": "Production", "PropagateAtLaunch": "true" }, ] } } } }

InstancesDistribution should be inside MixedInstancesPolicy block, which you do not have. InstancesDistribution应该在您没有的MixedInstancesPolicy块内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS 自动扩展和 Spot 实例 - AWS autoscaling and spot instances 包含 Spot 实例的 AutoScaling 组是否会响应 Spot 实例中断通知? - Does an autoscaling group that contains spot instances respond to spot instance interruption notices? 在Cloudformation中获取AutoScaling组 - Getting AutoScaling group in Cloudformation 如果没有可用的现货实例,具有 MixedInstancesPolicy 的 AWS Autoscaling 组是否会启动按需实例? - Will AWS Autoscaling group with MixedInstancesPolicy launch On-Demand instance if no spot instances available? 在AWS CloudFormation中,是否可以使用Mappings中没有AutoScaling组的值创建多个EC2实例? - In AWS CloudFormation is it possible to create a number of EC2 instances with the values from Mappings without AutoScaling group? 获取自动扩展组提出的所有现场请求 - Get all spot requests raised by an autoscaling group 使用Cloudformation和竞价型实例执行RollingUpdate - Perform RollingUpdate using Cloudformation with Spot Instances Cloudformation创建的自动伸缩组超时 - Cloudformation-created Autoscaling group timeout autsaling launchconfig组中的aws cloudformation“NetworkInterfaces” - aws cloudformation “NetworkInterfaces” in Autoscaling launchconfig group 增加cloudformation自动缩放组中的根设备大小 - Increase the root device size in cloudformation autoscaling group
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM