我有一个正在尝试部署的 CloudFormation 模板。
它是为us-west-2制作的。我正在尝试将其部署在 us-east-1 中。
我已尝试进行所需的所有更改,但我不断收到错误:
CREATE_FAILED
周围:
Type:AWS::AutoScaling::AutoScalingGroup Logical ID: WebServerScalingGroup Reason: The availability zones of the specified subnets and the AutoScalingGroup do not match
下面是我的模板引用“WebServerScalingGroup
”的一部分。
"WebServerScalingGroup":{
"Type":"AWS::AutoScaling::AutoScalingGroup",
"UpdatePolicy":{
"AutoScalingRollingUpdate":{
"MinInstancesInService":{
"Ref":"MinWebServers"
},
"MaxBatchSize":"1",
"PauseTime":"PT5M"
}
},
"Properties":{
"AvailabilityZones":{
"Fn::FindInMap":[
"AWSRegions2AZ",
{
"Ref":"Region"
},
"AZ"
]
},
"VPCZoneIdentifier":{
"Ref":"WebServerSubnetsID"
},
"LaunchConfigurationName":{
"Ref":"WebServerLaunchConfig"
},
"MinSize":{
"Ref":"MinWebServers"
},
"MaxSize":{
"Ref":"MaxWebServers"
},
"DesiredCapacity":{
"Ref":"DesiredNumberOfWebServers"
},
"LoadBalancerNames":[
{
"Ref":"ElasticLoadBalancer"
}
],
"Tags":[
{
"Key":"Network",
"Value":"Private",
"PropagateAtLaunch":"true"
},
{
"Key":"Name",
"Value": {
"Fn::Join":[
"",
[
"vidly-mediadrop-app-",
{
"Ref":"EnvironmentType"
}
]
]
},
"PropagateAtLaunch":"true"
}
]
}
},
编辑:下面是AWSRegions2AZ
"AWSRegions2AZ":{
"us-east-1":{
"AZ":[
"us-east-1b",
"us-east-1c",
"us-east-1d",
"us-east-1e"
]
}
最佳答案
从您提供的代码片段中很难看出,但从您收到的消息来看,我想说您在 WebServerSubnetsID
中提供的子网 ID 与不同的集合(或子网的子集)相关联。 ) 由 AWSRegions2AZ
返回的可用区域。
您是否在每个可用区中创建了子网?
关于amazon-web-services - 当我尝试部署 CloudFormation 模板时,我得到 "The availability zones of the specified subnets and the AutoScalingGroup do not match",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31858660/