如何通过编程将AWS Lambda触发器设置为Alexa Skills [英] How to set a AWS lambda trigger to Alexa Skills programatically

查看:126
本文介绍了如何通过编程将AWS Lambda触发器设置为Alexa Skills的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要设置一个使用Alexa事件运行该触发器的AWS Lambda触发器,但是我在SDK文档中找不到任何内容。

I'd like to set the trigger of an AWS lambda that uses Alexa events to run the trigger, but I can't find anything in the SDK documentation.

有人知道吗?如果有人向我展示了如何使用node.js SDK进行操作,我会特别高兴,但是也欢迎其他想法(CLI)。

Does anybody know? I would be particularly happy if somebody showed me how to do it with the node.js SDK, but other ideas (CLI) are also welcome.

事件源映射SDK调用,但似乎无法解决问题。我认为这些API是为Kinesis和Dynamo流设计的,只是赶不上最新的Alexa开发更改。

I was playing around with the event source mapping SDK calls, but it doesn't seem to do the trick. I think the APIs were designed for Kinesis and Dynamo streams and just didn't catch up with latest Alexa development changes.

推荐答案

I找到了。感谢这个亚马逊开发者论坛文章

I have found it. Thanks to this Amazon Developer Forum Article

您需要使用添加权限。这是一个CLI示例,但是使用node.js SDK时,相同的参数对我有用:

You need to use the add-permission. Here is a CLI example, but the same parameters worked for me using the node.js SDK:

aws --region us-east-1 lambda add-permission \
--function-name FUNCTIONAME \
--statement-id "1234" \
--action "lambda:InvokeFunction" \
--principal "alexa-appkit.amazon.com"

这篇关于如何通过编程将AWS Lambda触发器设置为Alexa Skills的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆