【发布时间】:2017-06-18 18:37:42
【问题描述】:
我有以下代码要上传到 lambda,它一直给我错误:“errorMessage”:“RequestId: bdfa695d-e8b8-11e6-952a-21bb5e95cff6 Process exited before completed request”,即使我'已经从完美的工作技能修改了这段代码。 代码只是告诉用户你好(用卡片),当用户说问我一个问题时,可以问他们一个问题。这是我的代码: `
var APP_ID=undefined;
var Alexa = require('./AlexaSkill');
var Sample = function () {
AlexaSkill.call(this, APP_ID);
};
var handlers = {
'LaunchRequest': function () {
this.emit(':ask', welcomeMessage, GetReprompt());
},
'Unhandled': function () {
this.emit(':ask', welcomeMessage, GetReprompt());
},
'AMAZON.HelpIntent': function () {
this.emit(':ask', HelpMessage, HelpMessage);
},
'AMAZON.StopIntent': function () {
this.shouldEndSession = true;
this.emit(':tell', stopSkillMessage, stopSkillMessage);
},
'AMAZON.CancelIntent': function () {
this.shouldEndSession = true;
this.emit(':tell', stopSkillMessage, stopSkillMessage);
},
'SaySomethingIntent': function () {
var speechOutput= "Hello";
var repromptOutput= "Say hello";
var cardTitle="Hello. This is the card title.";
var overviewMessage="This is a card.";
this.askWithCard(speechOutput, repromptOutput, howToPlayCardTitle, overviewMessage);
},
'AskIntent': function () {
var question="Hi there, what's your name?";
this.askWithCard(question);
}
}
exports.handler = function (event, context) {
var sample = new Sample();
sample.execute(event, context);
};
` 任何类型的帮助,甚至任何使用 aws 的提示,将不胜感激。谢谢。
【问题讨论】:
-
您能看看这个 Lambda 的 CloudWatch 日志吗?通常如果有错误,它会在那里打印出来。
标签: javascript amazon-web-services aws-lambda alexa alexa-skill