【问题标题】:AWS SAM - Failed to create the changeset: Waiter ChangeSetCreateComplete failedAWS SAM - 无法创建变更集:Waiter ChangeSetCreateComplete failed
【发布时间】:2019-02-13 13:48:12
【问题描述】:

AWS SAM 使用 aws-sam-cli 将代码库部署到 AWS 云,但它使我出现以下错误。

Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Requires capabilities : [CAPABILITY_IAM]

【问题讨论】:

    标签: amazon-web-services aws-lambda amazon-iam aws-sam


    【解决方案1】:

    在创建或部署堆栈时,您需要明确允许创建 IAM 资源。为此,您需要在调用sam deploy时添加参数:

    --capabilities CAPABILITY_IAM

    如果您想创建命名的 IAM 资源(例如,您明确指定名称的角色或用户),您需要改用 --capabilities CAPABILITY_NAMED_IAM

    您可以在此处阅读有关在 CloudFormation 中部署 IAM 资源的更多信息:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities

    SAM 部署文档:https://github.com/awslabs/aws-sam-cli/blob/develop/docs/deploying_serverless_applications.rst#deploying-your-application

    【讨论】:

    • 感谢 --capabilities CAPABILITY_IAM 标志的工作正常
    【解决方案2】:

    请检查您的 YAML 文件缩进。再次检查 YAML 文件,如果它有点不符合 SAM 标准,它将引发此错误。请再次检查。

    【讨论】:

      猜你喜欢
      • 2021-06-30
      • 2021-10-03
      • 2021-09-11
      • 2020-10-28
      • 1970-01-01
      • 2022-09-24
      • 1970-01-01
      • 2019-09-01
      • 1970-01-01
      相关资源
      最近更新 更多