gpt4 book ai didi

amazon-web-services - 包含 Spot 实例的 CloudFormation LaunchTemplate AutoScaling 组

转载 作者:行者123 更新时间:2023-12-03 07:33:27 25 4
gpt4 key购买 nike

我正在创建一个 CloudFormation 模板来部署一个仅应使用竞价实例的自动缩放组。 Cloudformation 使用此模板引发错误。这里出了什么问题?

错误: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 应位于 MixedInstancesPolicy 内 block ,您没有。

关于amazon-web-services - 包含 Spot 实例的 CloudFormation LaunchTemplate AutoScaling 组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73198114/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com