I was prompted to dive back into the Amazon Alexa Skill development by the new Alexa Hackster.io contest.
I quickly classified the development of Alexa Skills into two major categories. They don’t break them down this way, but it makes more sense to think of their development by the requirements of the developer and setup.
- Not user specific – Generic information and interactions available to everyone
- User specific – Needs information from the user like configurations, links to their devices, or specific user instances.
The non-user-specific Alexa skills are fairly simple to create and for this guide I will be creating one using Node.js in an Amazon Lambda function (their version of a cloud run process) combined with an Amazon Skill.
- Set up a new Amazon Lambda function (Needs to be in N.Virginia in the top right of your dashboard screen)
- Set up a new Amazon Skill
- Grab the Application Id from the newly created Amazon Skill and replace the part in the AlexaSkill.js file relating to the ApplicationId.
- Then upload the zip file to your Amazon Lambda function.
- Then define the Voice Interface using the two files in the speechAssets folder. (IntentSchema.json and SampleUtterances.txt)
- In your lambda function, go to the Event Sources tab, and add the “Alexa Skills Kit” Event source.
- Then copy your Amazon Lambda’s ARN (Amazon Resource Name) and past that into the Endpoint textbox in the Configurations Tab of your Alexa Skill – something like arn:aws:lambda-us-east-2:9081209381:function:hello-world
The user-specific Alexa skills require an endpoint that allows the user to login to your own authentication service. This in turn will require a web app and a database of stored information per user. Stay tuned for more information on how to make that happen.
At the end of my investigation of the non-user-specific Alexa skill, I created and deployed a Wind Reporting service to Alexa that allows me to use the Echo to find out what the current Wind conditions are in my city before I take my drone out for flights.
Check out the Hackster.io post for the Alexa Wind Reporting Service: https://www.hackster.io/anthony-ngu/alexa-wind-reporting-service-7aada2
Publishing an Alexa Skill
Some things to keep in mind if you are making your own Alexa Skill for global publishing.
- You will need icons for your Alexa Skill
- You will need to process the generic Help intent
- You will need to process the generic Stop / Cancel intents