Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 2.89 KB

File metadata and controls

51 lines (40 loc) · 2.89 KB

travel-browser

Skill Setup

This assumes you are familiar with all the steps to setup a skill in developer.amazon.com and aws.amazon.com. If not, start here.

Skill Steps

The high level steps are:

Sign In to developer.amazon.com and create a new skill called Travel Browser with invocation name: "travel browser".

From the Build tab:

  1. Click "JSON Editor" and paste in the /models/en-US.json file to define the language model.
  2. Click "Interfaces" and enable the Display Interface option.
  3. Click "Build Model"

IAM Steps

  1. Go to the AWS IAM console
  2. Locate your skill's Role, sometimes called "lambda_basic_execution",
  3. Verify or attach a policy such as DynamoDBFullAccess, to grant your Lambda function access to the DynamoDB service.

Lambda Steps

There will be many AWS components by the time the entire app is finished. To be safe, create all components in the region 'us-east-1' aka N. Virginia.

  1. Create a new Lambda Function. Start with a blank function.
  2. Select an ASK Trigger from the left, scroll down and Disable Skill ID verification for now, and scroll up click SAVE.
  3. Update the Execution Role to the existing role you just updated.

Deploy and Test

  1. From a command prompt, navigate to /lambda/custom
  2. Type npm install Node.JS will download and install several packages to the node_modules folder. You can optionally delete the node_modules/aws folder to save space.
  3. Type cd ../..
  4. Zip and upload the contents of the /lambda/custom folder to your Lambda function. You can use the CLI or run ./deploylambda.sh to automate this step. First run chmod 755 *.sh to make the script executable.
  5. Test your skill with a complete interaction, such as "open travel browser" and "stop".
  6. The skill may fail the first time, it will be creating a new DynamoDB table for you called askMemorySkillTable.
  7. Test again, for example, "tell travel browser my name is sam", then "stop". When you return to the skill you should be greeted with a first name.
  8. Review the Alexa App cards and any Echo Display screen to see visual content.

Link Session

The skill can generate a new random pass phrase.

  1. Launch the skill, and say "link session"
  2. The skill should respond with instructions including a three-part pass phrase, such as Fast Car 345.

New DynamoDB Table

You may create the table in advance, just use a primary key of "id" (string). The ask-sdk will create a new table if needed upon first use of persistent attributes. The table name, and many other settings, are set in the /lambda/custom/constants.js file (or when launching a SAM stack). You can view the Tables Console to create and query the table.

Next Step