irams
irams

Reputation: 91

Alexa Skills Kit sample skill wont upload on Amazon Lambda - throws error

I have set up the Hello World (https://github.com/amzn/alexa-skills-kit-js/tree/master/samples/helloWorld)) sample skill on AWS Lambda and the Alexa Console. But when I go to run it, it gives me this error:

module initialization error: Error at Error (native) at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.Module._extensions..js (module.js:415:20)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/var/task/index.js:20:18)
at Module._compile (module.js:409:26)

I upload the files on AWS Lambda by creating a zip of the index.js and AlexaSkill.js file found within the src folder. What am I doing wrong?

Upvotes: 3

Views: 354

Answers (1)

Jannie Theunissen
Jannie Theunissen

Reputation: 30104

I had a similar problem. It turned out to be the file permissions on the include file that is bundled with your index.js file. This fixed it for me:

chmod 755 AlexaSkill.js

Before zipping up the bundle and uploading.

Upvotes: 1

Related Questions