Create an Alexa Skill that provides study tips using AWS Lambda and DynamoDB

Tigerine
2 min readMar 23, 2023

Link to the online documentation can be found here

The online documentation gives a general guidance on how to build a custom Alexa skill. Also, having an Alexa-enabled device is a “nice-have” but not a “must-have” as the Alexa skill can be tested on the console itself.

I was going to give a detailed guide on how to complete this project but I found this online tutorial short and simple so go watch it and come back here to see some other tips you can follow.

Find additional tips below:

  1. Create a table on DynamoDB- I decided to make this the first step as other steps in this project were dependent on this. Here, I created a table and populated the table with different study tips.
  2. Create Alexa custom skill- Here, you have to log in to the Developer console (different from the AWS console) so you might have to create an account if you don’t have one. I created the skill, invocation name, intent, sample utterances etc. Choose your host based on the programming language you are using for your Lambda function (Python or Node.js).

To find the code template suggested by Alexa/AWS, at the top of the screen, beside ‘Build’ is a tab called ‘Code’, on the index.js is a code template that you can copy and customize to whatever skill you are creating.

3. Create a Lambda function and connect it to DynamoDB- I created the Lambda function with my customized code and connected it to the DynamoDB (scroll to the environment variables and add an environment variable with the name of your DynamoDB table). I also created a trigger using the skill ID of my alexa skill.

P.S: You might have to update the execution role on the lambda function with the necessary permissions (AmazonDynamoDBFullAccess and AlexaForBusinessFullAccess)

4. Build and Test Model- Connect the lambda function to the alexa skill using the endpoint tab and build the model. Go ahead to test it and hear Alexa show off her new skill

Disclaimer: This article describes my personal journey and recommendations made are merely suggestions.
Please feel free to share your thoughts, feedback or criticisms. Look forward to hearing from you

--

--

Tigerine

Just here to express my thoughts and all the chaos that goes on in my head. Baring it all out here so I hope you get to relate with my content.