I created my Alexa skill as an AWS Lambda java app and used the HelloWorld example provided in the Alexa Skills Kit. I followed all the steps given on the Amazon site including all the steps given here Alexa not finding my Skill. Since Amazon doesn't fully give instructions at this point to use Lambda with java I followed the steps given in this tutorial https://github.com/jjaquinta/EchoProofOfConcepts/tree/master/jo.echo.lambda which I found on the Amazon forums page. When I run the code in Lambda it accepts it but only shows this as the Execution result:
{
"version": "1.0",
"sessionAttributes": {}
}
And get the following log output for an Alexa start session request:
START RequestId: 1e8a753b-37a5-11e5-bad6-6df6c6d7bdc9
SpeechletLambda init
warn:No timestamp tolerance has been configured, disabling timestamp verification
SpeechletLambda done init
Handling request
0 [main] WARN com.amazon.speech.speechlet.authentication.ApplicationIdVerifier - Application ID verification has been disabled, allowing request for application ID amzn1.echo-sdk-ams.app.[unique-value-here]
warn:Timestamp verification has been disabled, allowing request request5678 with timestamp null
error:Exception occurred in speechlet
java.lang.NullPointerException
jo.echo.lambda.utils.SpeechletLambda.handleRequest(SpeechletLambda.java:119)
hello.HelloWorldLambda.handleRequest(HelloWorldLambda.java:38)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
lambdainternal.EventHandlerLoader$StreamMethodRequestHandler.handleRequest(EventHandlerLoader.java:494)
lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:832)
lambdainternal.AWSLambda.startRuntime(AWSLambda.java:223)
lambdainternal.AWSLambda.<clinit>(AWSLambda.java:56)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:348)
lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:93)
END RequestId: 1e8a753b-37a5-11e5-bad6-6df6c6d7bdc9
REPORT RequestId: 1e8a753b-37a5-11e5-bad6-6df6c6d7bdc9 Duration: 2231.45 ms
Billed Duration: 2300 ms Memory Size: 512 MB Max Memory Used: 78 MB
When I try the Skill with the echo I got an "Unexpected Communication Issue": Request Identifier:amzn1.echo-api.request.173c5d6c-8e97-493c-9efd-beb88cffd82f there was a problem communicating with the requested application.
Has anyone run into the same problem? I figure it might have to do with my zip packaging, so does anyone know the right way to package it?
This is the code I used for HelloWorld https://docs.google.com/document/d/1DU_-kAOxnhEp_4Lsj6I_LzEN4Di6-4Gmk28OZgc80IA/pub