0

尝试访问我的 lambda 函数时出现以下错误(发布在下面)。主要问题是我很困惑 AWS lambda 函数应该如何通过简单地给它我的本地 IP 地址(和端口)来与我的树莓派通信。我错过了什么吗?

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...

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

我在 AWS 中的意图图片

这也是我的 lambda 函数:

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

4

0 回答 0