[英]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.