AWS Certified Alexa Skill Builder – Specialty — Question 44
An Alexa Skill Builder is using session attributes to maintain a user's state.
What can the Builder do to ensure that a user's session is not lost if they take too long to answer a question and the skill exists?
Answer options
- A. Set shouldEndSession to false in the response object to prevent the skill from exiting.
- B. Handle the SessionEndedRequest request type and persist the user's session to a database.
- C. Return false from the SessionEndedRequest handler so the session does not exist.
- D. Return a reprompt in the response object from the SessionEndedRequest handler.
Correct answer: A
Explanation
The correct answer is A because setting shouldEndSession to false allows the session to remain active, preventing the skill from exiting. Option B suggests persisting the session, which is not necessary if the session is still active. Option C is incorrect as returning false does not prevent the session from being ended. Option D does not apply since handling the SessionEndedRequest does not allow for a reprompt in this context.