2

So, I'm trying to invoke a Google Could Messaging service from Amazon echo, using NodeJS (using mac os x).

Since my main.js file contains 3rd party libraries, I installed them with "npm install" command. I'm using the following libraries for sure:

When I made my ZIP file and uploaded to amazon lambda, I got the following error message:

It looks like your Lambda function "oAa" is unable to be edited inline, so you need to re-upload any changes. This may be because your file is too large or your zip file contains more than one file to edit. However, you can still invoke your function right now.

The ZIP file isn't large, it's only 1.5 Mb. I assume I have this error, because the file contains all the libraries I need, with more than one js file.

I've attached the folder structure of my ZIP file. It contains from one file and one folder. I have one file in the main folder, and a tons of libraries next to it (inside the second folder). enter image description here

UPDATE this is the error message what I get:

{ "errorMessage": "Exception: TypeError: Cannot read property 'application' of undefined" }

and this didn't work as a solution: https://forums.developer.amazon.com/forums/message.jspa?messageID=18330

Did any of you met with the same issue in the past? May I kindly ask for your help, guys ?

Thanks, Karoly

Hank D
  • 6,271
  • 2
  • 26
  • 35
narancs
  • 5,234
  • 4
  • 41
  • 60

4 Answers4

2

I got it to work by not zipping the directory (and contents) but by adding the contents of the directory to a zip archive. Basically, I removed the upper level directory. AWS Lambda's UI was able to locate my .js then.

0

It's hard to tell what exactly the problem is with Alexa, did you make sure you filled out the configuration and event sources tab correctly (this would be under the AWS part). Did you update your application ID? This is the biggest pain in the butt. Did you just upload your zip folder and click test? (which is incorrect).

allegory
  • 124
  • 1
  • 1
  • 10
0

I don't think this is an error, per se. I get this frequently and my skills still work without problem. I believe all this means is that "your Lambda function xxxx is unable to be edited inline". You will have to continue editing in an external editor and uploading the zip instead of being able to edit in Amazons lambda text editor.

I think the TypeError in your update is an unrelated issue.

Brad Irby
  • 2,397
  • 1
  • 16
  • 26
0

I was receiving this error and solved it by looking at CloudWatch logs. You will see much more detailed error messages in there, and a log will be created each time you try to run your function.