The purpose of this project is to make it as easy as possible to set up a new Hello World Alexa Skill that runs as a nodejs Lambda function on AWS.
- Create an AWS Account.
- Install and configure the AWS Command Line Interface. Info here and here.
- Make sure NodeJS is installed.
- Go to the Amazon Developer Portal. Click "Get Started" with Alexa Skills Kit.
- In a separate tab, go to the Lambda Function Portal on AWS.
- Go through the steps to create a new Lambda function - skip the blueprint step, choose a name for your function (save this for later), and write down the Application ID. You'll need it later. Then select "Upload a .ZIP file" under "Lambda function code".
- Now you'll need to upload a zip file to get started with code for your Lambda function. Switch over to your terminal where you checked out this project, and do an
npm install
. - Run
gulp zip
to generate a zip file in the ./dist folder. - Switch back to the browser on Lambda and select the "archive.zip" under Upload.
- Choose a role for your Lambda function - either create a Basic execution role or use a one you previously set up.
- Click "Next" and then "Create Function"
- Switch to the "Event Sources" tab and add an event source type for "Alexa Skills Kit"
- Switch back to the Alexa Developer Console tab and choose "Add a New Skill"
- Choose a Name and Invocation Name for your skill (see docs for more info) - or just Use "Hello World" and "Greeter" to follow the Hello World example.
- Under "Intent Schema", copy the contents of ./speechAssets/IntentSchema.json. Under "Sample Utterances", do the same with SampleUtterances.txt.
- Click Next, then switch over to the Lambda Function tab and copy the value for ARN which should be in the top right corner of the page when viewing your Lambda Function.
- Paste this in the "Configuration > Endpoint" field of the Alexa developer console and hit "Next".
- Open src/config.js and replace the appropriate values with Lambda ARN, Lambda Function Name, Amazon App ID (found here), region (defaults to us-east-1), and skill title.
- At this point you should be able to test your skill with your Amazon Echo by using the phrase you configured in the Invocation Name.
gulp test
or AWS_PROFILE=MY_PROFILE_NAME gulp test
TODO - You'll need to configure appropriate intent test files to do this.