AWS Certified Alexa Skill Builder – Specialty — Question 21
An Alexa Skill Builder wants a skill to inform the users of the number of times they have launched the skill.
What approach should the Builder take to track this information?
Answer options
- A. Store and increment a launchCount session attribute.
- B. Using the ASK SDK, implement a persistent attribute that is stored and retrieved from Amazon DynamoDB.
- C. Perform a scan of the Amazon DynamoDB table for the number of records and count each record as a skill launch.
- D. Set up a global variable in the code project that increments each time the code is invoked by Amazon Alexa.
Correct answer: B
Explanation
The correct answer is B because using the ASK SDK to implement a persistent attribute stored in Amazon DynamoDB allows for reliable tracking of the skill launches across different sessions. Option A is incorrect as session attributes are not persistent and would reset after the session ends. Option C is inefficient since scanning a table to count records can be resource-intensive, and option D is not suitable as global variables do not maintain state between different sessions or invocations.