0

我已经使用 lambda 后端手动部署了许多 Alexa 技能并了解手动过程,但是我不熟悉使用 ask cli v2。

我相信我已经完成了指南中的所有步骤,只要同时设置了 ask 和 aws cli。我已经在 AWS 中设置了我的角色。

我目前只是想习惯这个过程并运行

ask new

更改调用然后运行

ask deploy

一切看似正确,直到

技能代码构建成功。使用构建流程 nodejs-npm 成功构建到 C:\location\projectName.ask\lambda\build.zip 的区域默认代码。

==================== 部署技能基础设施 ===================== / 为区域部署 Alexa 技能基础设施“默认”→ 不存在 IAM 角色。创建 IAM 角色...

然后我们就等着……永远。

AWS CLI 配置文件具有 IAMFullAccess 以根据需要创建角色。

我错过了什么?

4

1 回答 1

0

So It ended up being an issue somewhere between permissions on my aws role and the configuration. I changed which role I was using and re-configured ask and aws.

I am not exactly sure where things were fixed because I immediately ran into another error that ended up being a bit of a rabbit hole. That I will describe here because it is common enough and could be seen while trouble shooting my original issue.

The issue I ran into is was when the deploy would happen successfully I could not test with the code that made it to my lambda. In cloud watch it presented as

"Runtime.ImportModuleError: Error: Cannot find module './dispatcher/error/mapper/GenericErrorMapper'"

This ended up being a bug within powershell and compressing to .zip on windows and being unpacked on linux.

I had to run

Install-Module Microsoft.PowerShell.Archive -MinimumVersion 1.2.3.0 -Repository PSGallery -Force

https://github.com/PowerShell/PowerShell/issues/2140

This fixed my final issue.

于 2020-05-29T18:49:35.427 回答