question

newuser-d0d01ca6-33fa-4378-bc7a-054e5c60d5a4 avatar image

SpeechletRequestStreamHandler with Speechlet or SkillStreamHandler with RequestHandler

The documentation at https://developer.amazon.com/docs indicates that skills deployed to lambda should be built using a SpeechletRequestStreamHandler and Speechlet (com.amazon.speech.speechlet.lambda.SpeechletRequestStreamHandler and com.amazon.speech.speechlet.Speechlet). However, the newest code in the SDK located at https://github.com/alexa/alexa-skills-kit-sdk-for-java/ uses subclasses of SkillStreamHandler and RequestHandler (com.amazon.ask.SkillStreamHandler and com.amazon.ask.dispatcher.request.handler.RequestHandler) to implement a skill deployed to lambda. Speechlet is not used.

What is the recommended or preferred way of doing this? And, if using SkillStreamHandler and RequestHandler, what class should be listed in the Handler field in the Lambda function configuration?

alexa skills kitlambdasdkjava
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jenn@amazon avatar image
Jenn@amazon answered

Thanks for reporting this. I've opened a ticket with our Docu Team to updated the instructions.

Looking in the Developing Your First Skill section of the Java SDK Wiki, it appears the correct class is the SkillStreamHandler.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jothi avatar image
jothi answered

seems like the documentation is not fixed yet. i got confused when i read the doc too.... luckily i found this answer...

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.