Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Deploy Sample Alexa Skill using Lambda

I'm trying to deploy the Alexa HelloWorld Skill from the samples project here: https://github.com/amzn/alexa-skills-kit-java, on commit b58bfa641c7d58c476b80a4e8dd5ccbe0f9b2c40.

Per the README I run:

mvn assembly:assembly -DdescriptorId=jar-with-dependencies package

and upload the resulting alexa-skills-kit-samples-1.0-jar-with-dependencies.jar to the Lambda console. When I try to test the Lambda (in the web console) I get:

START RequestId: fe219281-be67-11e5-b15e-d79134e05828 Version: $LATEST
Class not found: helloworld.HelloWorldSpeechletRequestStreamHandler: class java.lang.ClassNotFoundException
java.lang.ClassNotFoundException: helloworld.HelloWorldSpeechletRequestStreamHandler
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)

END RequestId: fe219281-be67-11e5-b15e-d79134e05828
REPORT RequestId: fe219281-be67-11e5-b15e-d79134e05828  Duration: 0.90 ms   Billed Duration: 100 ms     Memory Size: 512 MB Max Memory Used: 10 MB

What am I missing?

like image 586
andrewmitchell Avatar asked Jan 19 '16 05:01

andrewmitchell


People also ask

Is Alexa supported by AWS Lambda?

You can use Lambda functions to build services that give new skills to Alexa, the Voice assistant on Amazon Echo. The Alexa Skills Kit provides the APIs, tools, and documentation to create these new skills, powered by your own services running as Lambda functions.

What is Reprompt?

(transitive) To prompt again.


1 Answers

I was also getting the same error.

It seems we need to run the mvn command within the directory"alexa-skills-kit-java-master\samples" and not from "alexa-skills-kit-java-master".

JAR created under "alexa-skills-kit-java-master\samples\target" has the helloworld class and I was able to successfully test the skill.

like image 79
Aspire Avatar answered Sep 18 '22 23:09

Aspire