0

I get the following error when trying to access my lambda function(posted below). The main problem is I am confused how AWS lambda function is supposed to communicate with my raspberry pi by simply giving it my local IP address(and port). Am I missing something?

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

I have set up port forwarding to the raspberry pi. I also have uploaded the lambda function to AWS. Furthermore, I have the server.js script running on the raspberry pi. Somewhere there is a communication error when accessing the lambda function via voice command. Here is what my intent looks like:

picture of my intent in AWS

also here is my lambda function:

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

David Graff
  • 141
  • 1
  • 4
  • 11
  • try this: https://stackoverflow.com/a/44173608/498256 – BMW Mar 17 '18 at 20:23
  • @BMW Thanks for the suggestion. I have seen that issue before but the problem is I dont understand the code enough to know exactly where my issue could relate to that one. I was simply inspired by this video: https://www.youtube.com/watch?v=OO2m5dOIiR4 and I wanted to create this with raspberry pi. Maybe I need to do more research. – David Graff Mar 17 '18 at 20:43

0 Answers0