【问题标题】:AWS failed to create and update stack (proactive events API) while creating Alexa skillAWS 在创建 Alexa 技能时未能创建和更新堆栈(主动事件 API)
【发布时间】:2023-02-04 04:34:22
【问题描述】:

我正在设置一项技能,其中包括我正在创建的 Amazon Alexa 技能的主动事件 API。我正在关注这个guide。这个问题的两个重要文件是 deploy.sh 和 pingme.yaml

当我在 git bash 中运行 deploy.sh 文件时,这是输出

Waiting for changeset to be created..
Waiting for stack create/update to complete

Failed to create/update the stack. Run the following command
to fetch the list of events leading up to the failure
aws cloudformation describe-stack-events --stack-name PingMe

当我运行命令时,它只是重复一系列 json 代码,这些代码遵循类似的格式(尽管具有不同的值)期望这一部分

            "ResourceStatus": "CREATE_FAILED",
            "ResourceStatusReason": "Resource handler returned message: \"Error occurred while GetObject. S3 Error Code: PermanentRedirect. S3 Error Message: The bucket is in this region: eu-west-1. Please use this region to retry the request (Service: Lambda, Status Code: 400, Request ID: SOME_ID)\" (RequestToken: SOME_TOKE, HandlerErrorCode: InvalidRequest)",

我对如何使用 AWS 有点困惑,我在 CLOUD_FORMATION 控制台中获得的唯一输出是 ROLLBACK_COMPLETE,旁边有一个红色的 X(这意味着它只是一个空堆栈)。我猜它说我不在正确的区域,即使指南说使用弗吉尼亚(美国)位置?

我在想我为我的 AWS 账户创建的用户在权限策略中缺少什么?当我设置 AWS CLI 时,它要求提供访问密钥和密钥。我很确定在我运行脚本时会自动创建一些新角色。 (如果可能的话)

运行脚本肯定为我的 AWS 用户做了一些事情,因为它显示了我第一次运行脚本时的活动。

【问题讨论】:

    标签: amazon-web-services shell yaml amazon-cloudformation alexa


    【解决方案1】:

    它看起来不像是权限问题。您应该为堆栈输出提供更多上下文,以便能够判断哪个资源创建失败,但查看该 repo,我猜是 lambda 创建失败,因为它无法找到代码源。

    如果您尝试在 us-east-1 中运行它,那么您的 lambda 源代码应该驻留在 us-east-1 中的 s3 存储桶中,看起来情况并非如此。

    如果您可以下载 zip,那么您可以先将 zip 文件上传到 us-east-1 存储桶,然后更改 ping.yaml 以指向新位置。

    您也可以在 github 存储库中提出问题并寻求指导。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-09
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 2018-04-21
      • 2020-09-21
      • 1970-01-01
      • 2022-08-05
      相关资源
      最近更新 更多