node.js - 我收到 "error message: Process exited before completing request"

标签 node.js aws-lambda alexa alexa-skills-kit

当我在 Lambda 内联代码编辑器上测试代码时,我总是收到此错误:

 "errorMessage": "RequestId: b8efba3e-8940-11e7-a176-e7452208b749 Process exited before completing request"

这是代码(我用亚马逊示例表单替换了我的代码,只是为了看看这是否只是我的代码):

'use strict';
var Alexa = require("aws-sdk");
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
var handlers = {
   'LaunchRequest': function () {
        this.emit('SayHello');
    },
    'HelloWorldIntent': function () {
      this.emit('SayHello');
},
    'SayHello': function () {
        this.emit(':tell', 'Hello World!');
    }
};

最佳答案

请检查您的 Lambda 函数配置。默认情况下处理程序名称应为“index.handler”。如果不完全相同,请相应更改。如果您要上传 .zip 文件,请确保您的主处理函数应位于 index.js 文件中。请参阅随附的屏幕截图,其中我标记了更改处理程序配置的位置。

enter image description here

关于node.js - 我收到 "error message: Process exited before completing request",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45873814/

相关文章:

node.js - AWS Lambda postgres 查询超时

amazon - 如何在亚马逊 Alexa 控制台上删除亚马逊技能?

javascript - Node.js集群: have each worker render different page

javascript - puppeteer : console. 登录评估触发器错误 "Unhandled promise rejection"

node.js - 模块初始化错误 : Error at Object. fs.openSync (fs.js :646:18) at Object. fs.readFileSync (fs.js:551:33)

javascript - 在 Node.js 中获取变量内部的值

javascript - Alexa Skill - 如果我的用户没有说停止,我如何重新提示他必须再次使用它?

node.js - Nest.js 类型 'DynamicModule' 无法分配给 Nest-modules/mailer 上的类型 'ForwardReference'

aws-lambda - S3 存储桶中的 AWS Lambda 代码未更新

amazon-web-services - AWS : Alarming on Metric Math alternative