Waiter ChangeSetCreateComplete 失败: Waiter 遇到终端故障状态

San*_*mar 2 amazon-web-services aws-cloudformation serverless aws-sam

我正在学习 CloudFormation 教程,这是我的 AWS CloudFormation 模板:

AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: A starter AWS Lambda function.
Resources:
  helloworldpython3:
    Type: 'AWS::Serverless::Function'
    Properties:
      Handler: app.lambda_handler
      Runtime: python3.6
      CodeUri: src/
      Description: A starter AWS Lambda function.
      MemorySize: 128
      Timeout: 3
      Environment:
        Variables:
          TABLE_NAME: !Ref Table
          REGION_NAME: !Ref AWS::Region
      Events:
        HelloWorldSAMAPI:
          Type: Api
          Properties:
            Path: /hello
            Method: GET
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref Table

Table:
  Type: AWS::Serverless::SimpleTable
  Properties:
    PrimaryKey:
      Name: greeting
      Type: String
    ProvisionedThroughput:
      ReadCapacityUnits: 1
      WriteCapacityUnits: 1
Run Code Online (Sandbox Code Playgroud)

我可以使用 生成最终模板aws cloudformation package。但是当我尝试使用 部署它时sam deploy,我从 shell 中得到以下输出:

错误:等待创建变更集..错误:无法为堆栈创建变更集:hello-world-sam,例如:Waiter ChangeSetCreateComplete 失败:Waiter 遇到终端故障状态:对于表达式“Status”,我们匹配预期路径:“失败”状态:失败。原因:模板属性无效 [表]

小智 7

在我的例子中,cfn linter 可以使用 yaml,错误(使用 cmd 中的 aws CLI)只是

\n
\n

Waiter ChangeSetCreateComplete 失败: Waiter 遇到终端失败状态:

\n

对于表达式“Status”,我们匹配预期路径:“FAILED”

\n
\n

您应该检查AWS 控制台\xe2\x86\x92 CloudFormation \xe2\x86\x92 {stack_name} \xe2\x86\x92 更改集

\n

我的错误原因在这里

\n
\n

状态原因

\n

不执行任何更新。

\n
\n

可能会帮助某人

\n