AWSSupport-TroubleshootCFNCustomResource - AWS Systems Manager 自动化运行手册参考

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

AWSSupport-TroubleshootCFNCustomResource

描述

AWSSupport-TroubleshootCFNCustomResource 运行手册可帮助诊断 AWS CloudFormation 堆栈在创建、更新或删除自定义资源时失败的原因。运行手册将检查用于自定义资源的服务令牌以及返回的错误消息。在查看自定义资源的详细信息之后,运行手册的输出会解释该自定义资源的堆栈行为和故障排除步骤。

运行此自动化(控制台)

文档类型

自动化

所有者

Amazon

平台

Linux、macOS、Windows

参数

  • AutomationAssumeRole

    类型:字符串

    说明:(可选)允许 Systems Manager Automation 代表您执行操作的 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称(ARN)。如果未指定任何角色,则 Systems Manager Automation 使用启动此运行手册的用户的权限。

  • StackName

    类型:字符串

    描述:(必填)自定义资源失败所在 AWS CloudFormation 堆栈的名称。

所需的 IAM 权限

AutomationAssumeRole 参数需要执行以下操作才能成功使用运行手册。

  • cloudformation:DescribeStacks

  • cloudformation:DescribeStackEvents

  • cloudformation:ListStackResources

  • ec2:DescribeRouteTables

  • ec2:DescribeNatGateways

  • ec2:DescribeSecurityGroups

  • ec2:DescribeVpcs

  • ec2:DescribeVpcEndpoints

  • ec2:DescribeSubnets

  • logs:FilterLogEvents

文档步骤

  • validateCloudFormationStack - 验证 AWS CloudFormation 堆栈是否存在于同一个 AWS 账户 和 AWS 区域 中。

  • checkCustomResource - 分析 AWS CloudFormation 堆栈,检查失败的自定义资源,并输出有关如何对失败的自定义资源进行故障排除的信息。