[英]How can I find the root cause for AWS CloudFormation stack creation failure?
I am trying to install a simple stack using AWS CloudFormation.我正在尝试使用 AWS CloudFormation 安装一个简单的堆栈。 I create an IAM user and also pass in some script to install Puppet and Git through userdata so that it can be executed by cloudinit.我创建了一个 IAM 用户,并通过 userdata 传递了一些脚本来安装 Puppet 和 Git,以便它可以由 cloudinit 执行。
The problem is for some reason the template fails mid way and the stack creation is rolled back.问题是由于某种原因模板在中途失败并且堆栈创建被回滚。 I am doing this through the management GUI.我通过管理 GUI 执行此操作。 But it doesn't tell me why it fails.但它并没有告诉我为什么它失败了。 I can see that some of the resources are created and then it fails.我可以看到一些资源被创建,然后它失败了。 Is there a way to look at detailed logs to see what exactly is failing?有没有办法查看详细的日志以查看到底是什么失败了?
The AWS Management Console for AWS CloudFormation offers an Events tab in the stack detail panel, which lists the stack life-cycle events and features a Reason column in turn, which contains more details for the errors in case. AWS CloudFormation的AWS 管理控制台在堆栈详细信息面板中提供了一个事件选项卡,该选项卡列出了堆栈生命周期事件,并依次提供了一个原因列,其中包含错误的更多详细信息以防万一。
This column exposes the ResourceStatusReason
field of the StackEvent data type retrieved via the DescribeStackEvents action:此列公开通过DescribeStackEvents操作检索到的StackEvent数据类型的ResourceStatusReason
字段:
ResourceStatusReason - Success/failure message associated with the resource ResourceStatusReason - 与资源关联的成功/失败消息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.