aws-cloudformation - SAM 部署失败错误 - Waiter StackCreateComplete 失败 : Waiter encountered a terminal failure state

标签 aws-cloudformation sam

当我尝试在 SAM 上部署包时,云形成控制台中的第一个状态是 ROLLBACK_IN_PROGRESS,之后更改为 ROLLBACK_COMPLETE

我尝试删除堆栈并重试,但每次都会出现同样的问题。 终端中的错误如下所示-

Sourcing local options from ./SAMToolkit.devenv
SAM_PARAM_PKG environment variable not set
SAMToolkit will operate in legacy mode.
Please set SAM_PARAM_PKG in your .devenv file to run modern packaging.
Run 'sam help package' for more information
Runtime: java
Attempting to assume role from AWS Identity Broker using account 634668058279
Assumed role from AWS Identity Broker successfully.
Deploying stack sam-dev* from template: /home/***/1.0/runtime/sam/template.yml
sam-additional-artifacts-url.txt was not found, which is fine if there is no additional artifacts uploaded
Replacing BATS::SAM placeholders in template...
Uploading template build/private/tmp/sam-toolkit.yml to s3://***/sam-toolkit.yml
make_bucket failed: s3://sam-dev* An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.
upload: build/private/tmp/sam-toolkit.yml to s3://sam-dev*/sam-toolkit.yml

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id sam-dev* does not exist
sam-dev* will be created.
Creating ChangeSet ChangeSet-2020-01-20T12-25-56Z
Deploying stack sam-dev*. Follow in console: https://aws-identity-broker.amazon.com/federation/634668058279/CloudFormation
ChangeSet ChangeSet-2020-01-20T12-25-56Z in sam-dev* succeeded
            "StackStatus": "REVIEW_IN_PROGRESS",
sam-dev* reached REVIEW_IN_PROGRESS
Deploying stack sam-dev*. Follow in console: https://console.aws.amazon.com/cloudformation/home?region=us-west-2
Waiting for stack-create-complete

Waiter StackCreateComplete failed: Waiter encountered a terminal failure state

Command failed.
Please see the logs above.

最佳答案

我将 SQS 设置为 Lambda 的事件源,但没有提供这样的权限

    - Effect: Allow
      Action:
      - sqs:ReceiveMessage
      - sqs:DeleteMessage
      - sqs:GetQueueAttributes
      Resource: "*" 

在 lambda 策略中。

我在“CloudFormation”服务的“事件”选项卡中发现了此错误。

关于aws-cloudformation - SAM 部署失败错误 - Waiter StackCreateComplete 失败 : Waiter encountered a terminal failure state,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59824201/

相关文章:

amazon-ec2 - 如何告诉 cloud-init 只运行 userdata 脚本?

python-3.x - 在 aws CodePipelines 上工作,每次创建堆栈都会失败

amazon-web-services - 如何将 AWS CloudFormation 模板中的现有 VPC 用于新的安全组

ssh - 如何自定义 sam 构建以传递 ssh 并访问我在 GitHub 上的私有(private)仓库?

amazon-web-services - AWS SAM 部署,如何找到 API 网关的 URL?

amazon-web-services - 如何在 CloudFormation 中使用 OR 实现多个条件?

amazon-web-services - 如何监控 AWS CloudFormation 上的自动扩展?

amazon-web-services - AWS SAM : An error occurred (ValidationError) when calling the CreateChangeSet operation: Parameter 'MaxAllowedPacket' must be a number

amazon-web-services - 如何通过 Swagger(或模板)启用 AWS API GW 的日志记录和跟踪

cors - SAM 应用程序部署给出预检错误,但如果我在 aws apigateway 控制台中创建 OPTIONS 方法,我的预检会通过