尝试访问lambda时出现AWS错误

时间:2018-03-17 18:18:12

标签: amazon-web-services npm lambda amazon-rekognition

尝试访问我的lambda函数时,我收到以下错误(在下面发布)。主要的问题是我很困惑AWS lambda函数应该通过简单地给它我的本地IP地址(和端口)与我的覆盆子pi进行通信。我错过了什么吗?

In:0.00% 00:00:02.73 [00:00:00.00] Out:24.0k [      |      ]        Clip:0
In:0.00% 00:00:02.90 [00:00:00.00] Out:24.0k [      |      ]        Clip:0
In:0.00% 00:00:02.99 [00:00:00.00] Out:26.6k [      |      ]        Clip:0

Done.

{ DependencyFailedException: Invalid Lambda Response: Received error response from Lambda: Unhandled
    at Object.extractError (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/protocol/json.js:48:27)
    at Request.extractError (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8)
    at Request.callListeners (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:685:12)
  message: 'Invalid Lambda Response: Received error response from Lambda: Unhandled',
  code: 'DependencyFailedException',
  time: 2018-03-17T17:50:58.550Z,
  requestId: 'be8febb3-2a0b-11e8-84e7-555de67cfcd3',
  statusCode: 424,
  retryable: false,
  retryDelay: 15.098259941461944 } 'DependencyFailedException: Invalid Lambda Response: Received error response from Lambda: Unhandled\n    at Object.extractError (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/protocol/json.js:48:27)\n    at Request.extractError (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8)\n    at Request.callListeners (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/sequential_executor.js:105:20)\n    at Request.emit (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\n    at Request.emit (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:683:14)\n    at Request.transition (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:22:10)\n    at AcceptorStateMachine.runTo (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/state_machine.js:14:12)\n    at /home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/state_machine.js:26:10\n    at Request.<anonymous> (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:38:9)\n    at Request.<anonymous> (/home/pi/raspi-dexter-lex-ai/node_modules/aws-sdk/lib/request.js:685:12)'
Restarting...

我已经设置了端口转发到raspberry pi。我还将lambda函数上传到AWS。此外,我在raspberry pi上运行了server.js脚本。某处通过语音命令访问lambda函数时出现通信错误。这就是我的意图:

picture of my intent in AWS

这里也是我的lambda函数:

https://github.com/just4give/raspi-dexter-lambda

0 个答案:

没有答案