【问题标题】:When I try deploying my CloudFormation template I get "The availability zones of the specified subnets and the AutoScalingGroup do not match"当我尝试部署我的 CloudFormation 模板时,我得到“指定子网的可用区和 AutoScalingGroup 不匹配”
【发布时间】:2015-10-01 02:07:01
【问题描述】:

我有一个正在尝试部署的 CloudFormation 模板。

它是为 us-west-2 制作的。我正在尝试在 us-east-1 中部署它。

我已尝试进行所有需要的更改,但我不断收到错误

CREATE_FAILED

周围:

类型:AWS::AutoScaling::AutoScalingGroup 逻辑 ID: WebServerScalingGroup 原因:指定的可用区 子网和 AutoScalingGroup 不匹配

以下是我引用“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"
        ]
      }

【问题讨论】:

  • 您需要向我们展示AWSRegions2AZ 映射和您的参数值。
  • @tedder42 我在帖子中添加了它。

标签: amazon-web-services amazon-ec2 amazon-cloudformation


【解决方案1】:

很难从您提供的 sn-ps 中分辨出来,但从您收到的消息来看,我会说您在 WebServerSubnetsID 中提供的子网 ID 与不同的可用性集(或子集)相关联AWSRegions2AZ 返回的区域。

您是否在每个 AZ 中创建了一个子网?

【讨论】:

  • 一般来说,我怀疑这个问题可以通过简单地删除AvailabilityZones来解决,因为VPCZoneIdentifiers的列表是它的超集。
猜你喜欢
  • 2014-01-07
  • 2014-07-04
  • 2021-09-02
  • 2020-02-02
  • 2017-12-16
  • 2021-12-27
  • 1970-01-01
  • 2023-04-11
  • 1970-01-01
相关资源
最近更新 更多