Amazon web services AWS Cloudformation未能确认自动校准组

Amazon web services AWS Cloudformation未能确认自动校准组,amazon-web-services,amazon-ec2,autoscaling,amazon-cloudformation,Amazon Web Services,Amazon Ec2,Autoscaling,Amazon Cloudformation,在使用CloudFormation创建EC2实例和自动缩放组时,我遇到了一个错误: 无法创建以下资源:[WebInstanceServerGroup] 创建自动缩放组时会看到失败,但当我检查自动缩放组控制台时,它会说创建“成功”。“进行中”删除发生在CloudFormation的15分钟超时值之后 CloudFormation不承认自动缩放组已成功创建的原因可能是什么 这个错误也说明了一些关于WebInstanceServerGroup的信息,所以我检查了我的模板,但是没有发现任何可疑的信息 "

在使用CloudFormation创建EC2实例和自动缩放组时,我遇到了一个错误: 无法创建以下资源:[WebInstanceServerGroup]

创建自动缩放组时会看到失败,但当我检查自动缩放组控制台时,它会说创建“成功”。“进行中”删除发生在CloudFormation的15分钟超时值之后

CloudFormation不承认自动缩放组已成功创建的原因可能是什么

这个错误也说明了一些关于WebInstanceServerGroup的信息,所以我检查了我的模板,但是没有发现任何可疑的信息

"WebsInstanceServerGroup": {
  "Type": "AWS::AutoScaling::AutoScalingGroup",
  "Properties": {
    "AvailabilityZones": {
      "Fn::GetAZs": "AWS::Region"
    },
    "VPCZoneIdentifier": {
      "Ref": "WebsELBSubnetId"
    },
    "LoadBalancerNames": [
      {
        "Ref": "WebsELB"
      }
    ],
    "LaunchConfigurationName": {
      "Ref": "WebsEC2Instance"
    },
    "Cooldown": 300,
    "HealthCheckGracePeriod": 600,
    "HealthCheckType": "EC2",
    "Tags": [
      {
        "Key": "Name",
        "Value": {
          "Ref": "WebsInstanceName"
        },
        "PropagateAtLaunch": "true"
      },
      {
        "Key": "Service",
        "Value": {
          "Ref": "ServiceTag"
        },
        "PropagateAtLaunch": "true"
      }
    ],
    "MinSize": {
      "Ref": "ASGMin"
    },
    "DesiredCapacity": {
      "Ref": "ASGDesired"
    },
    "MaxSize": {
      "Ref": "ASGMax"
    }
  },
  "CreationPolicy": {
    "ResourceSignal": {
      "Count": {
        "Ref": "ASGMin"
      },
      "Timeout": "PT15M"
    }
  }
}

如果需要更多信息,请告诉我,提前谢谢。

看起来您的自动缩放组中的EC2实例没有发送

CloudFormation将在考虑成功创建WebInstanceServerGroup之前等待您发送ASGMin信号。因此,如果ASGMin设置为3,那么3个EC2实例中的每一个都应该发送一个信号

要发送信号,您可以使用助手,或

在脚本末尾使用此命令,当您认为EC2实例已完全配置并准备好运行时。

aws cloudformation signal-resource \ 
  --stack-name {your stack name here} \
  --status SUCCESS \ 
  --logical-resource-id WebsInstanceServerGroup \ 
  --unique-id {the instance ID for the EC2 instance that is sending the signal}