AWS CloudFormer 堆栈创建失败(无法在指定的持续时间内接收到 1 个资源信号)

AWS CloudFormer stack creation failed with (Failed to receive 1 resource signal(s) within the specified duration)

我尝试使用 AWS CloudFormer 为现有资源创建模板,但是,CloudFormer 堆栈创建多次失败,原因不明。您可以在下面找到完整的日志,我尝试将选项中的超时增加到 100 分钟,但我得到了相同的结果:

22:16:49 UTC+0300   CREATE_FAILED   AWS::EC2::Instance  WebServer   Failed to receive 1 resource signal(s) within the specified duration
21:45:58 UTC+0300   CREATE_IN_PROGRESS  AWS::EC2::Instance  WebServer   Resource creation Initiated
21:45:56 UTC+0300   CREATE_IN_PROGRESS  AWS::EC2::Instance  WebServer   
21:45:54 UTC+0300   CREATE_COMPLETE AWS::IAM::InstanceProfile   CFNInstanceProfile  
21:43:54 UTC+0300   CREATE_COMPLETE AWS::IAM::Policy    CFNRolePolicy   
21:43:54 UTC+0300   CREATE_IN_PROGRESS  AWS::IAM::Policy    CFNRolePolicy   Resource creation Initiated
21:43:53 UTC+0300   CREATE_IN_PROGRESS  AWS::IAM::InstanceProfile   CFNInstanceProfile  Resource creation Initiated
21:43:53 UTC+0300   CREATE_IN_PROGRESS  AWS::IAM::Policy    CFNRolePolicy   
21:43:52 UTC+0300   CREATE_IN_PROGRESS  AWS::IAM::InstanceProfile   CFNInstanceProfile  
21:43:50 UTC+0300   CREATE_COMPLETE AWS::IAM::Role  CFNRole 
21:43:44 UTC+0300   CREATE_COMPLETE AWS::EC2::SecurityGroup WebServerSecurityGroup  
21:43:43 UTC+0300   CREATE_IN_PROGRESS  AWS::EC2::SecurityGroup WebServerSecurityGroup  Resource creation Initiated
21:43:39 UTC+0300   CREATE_IN_PROGRESS  AWS::IAM::Role  CFNRole Resource creation Initiated
21:43:27 UTC+0300   CREATE_IN_PROGRESS  AWS::EC2::SecurityGroup WebServerSecurityGroup  
21:43:27 UTC+0300   CREATE_IN_PROGRESS  AWS::IAM::Role  CFNRole 
21:43:18 UTC+0300   CREATE_IN_PROGRESS  AWS::CloudFormation::Stack  AWSCloudFormer  User Initiated

CloudFormation 正在等待来自 CloudFormer WebServer 实例的通知,在 CloudFormer 模板中使用 CreationPolicy.

指定

安装 CloudFormer 应用程序的引导脚本在 运行 /opt/aws/bin/cfn-signal 通知 CloudFormation 应用程序安装正确的最后一步或之前失败。

引导脚本记录到 /var/log/setup_cloudformer.log,因此您可以通过查看那里获得有关失败原因的更多信息。

要尝试调查,您可以在 EC2 实例页面上选择 Launch More Like This 操作来启动另一个 CloudFormer WebServer 实例。然后您可以提供密钥对并更新安全组以允许 SSH 访问以查看日志。

在参数中,指定用户名和密码。必须创建实例。

除了 Anush Arvind 的回答,您还必须注意不要在密码中包含特殊字符。

来自官方文档:

You can't leave the password blank, and you can't use special characters in the password (such as ; & ! " £ $ % ^ ( ) / ).

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-using-cloudformer.html