gpt4 book ai didi

amazon-web-services - 服务员ChangeSetCreateComplete失败: Waiter encountered a terminal failure state

转载 作者:行者123 更新时间:2023-12-01 23:27:41 27 4
gpt4 key购买 nike

我正在学习 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

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

error : Waiting for changeset to be created..Error: Failed to create changeset for the stack: hello-world-sam,ex: Waiter ChangeSetCreateComplete failed: Waiter encountered aterminal failure state: For expression "Status" we matchedexpected path: "FAILED" Status: FAILED. Reason: Invalidtemplate property or properties [Table]

最佳答案

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

Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state:

For expression "Status" we matched expected path: "FAILED"

你应该离开检查AWS console → CloudFormation → {stack_name} → 变更集

我的错误原因在这里

Status reason

No updates are to be performed.

可能会帮助某人👍

关于amazon-web-services - 服务员ChangeSetCreateComplete失败: Waiter encountered a terminal failure state,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66943082/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com