Coder Social home page Coder Social logo

thornegladwin / alexa_skill_template Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 427 KB

A simple template that can be used help create new Alexa skills.

License: MIT License

JavaScript 100.00%
alexa-skill alexa alexa-custom-skill alexa-skill-setup alexa-voice-service alexa-skills-kit alexa-sdk

alexa_skill_template's Introduction

Alexa Skill Template

A simple template that can be used help create new Alexa skills.

Prerequisites

  • You will need to have installed:
    npm install -g ask-cli
  • To have created a fresh new Alexa skill using the Alexa Developer Console.

    Select the 'Custom' and 'Provision your own' and 'Start from Scratch' options when running through the setup.

  • To have created a new IAM Policy with the following permissions:
    • Lambda
      • GetFunction
      • UpdateFunctionCode
      • UpdateFunctionConfiguration
    • IAM
      • GetRole

    Create a new policy under the AWS IAM console, using the 'Visual editor'.

  • To have created an IAM role that inherits your newly created IAM Policy.

    Create a new role in the AWS IAM console with a use case of 'Lambda'. Under 'permissions' attach your new policy.

  • To have created a new Lambda function.

    Under the permissions section, select 'Use an existing role' and select your newly created IAM role.

  • To have created an IAM user to execute deployments.

    In the AWS IAM console, create a new user with 'Access type' set to 'Programmatic access'. Under permissions, select 'Attach existing policies directly' and select the policy that you created above. Make note of the Access key ID and Secret access key generated.

Setup

  1. Configure the new Lambda function to accept your newly created Alexa skill.

    Within the AWS console, open the Lambda function and click to 'add trigger'. From the dropdown list, select 'Alexa Skills Kit' and enter the Skill ID of your newly created Alexa skill. The Skill ID of your Alexa skill can be found under 'Endpoint' within the 'Build' tab of the Alexa Developer Console.

  2. Set the new Lambda function as the default region under "Endpoint" for your newly created Alexa skill.

    This is set under 'Endpoint' within the 'Build' tab of the Alexa Developer Console. The ARN of your Lambda function can be found in the top right corner when you select the Lambda function in the AWS console.

  3. Update the variables for [skillId], [iamRole] and [lambda.arn] under .ask/ask-states.json locally.
  4. Update the variables for [endpoint.uri] and [locale.name] under skill-package/skill.json locally.
  5. Run the following command to authenticate the ASK CLI with your Alexa Developer Console user and newly created IAM user.
    ask init

    Make sure you set the profile name as 'default'. Select 'Y' when asked to associate an AWS profile and enter the Access key ID and Secret access key of your newly created IAM user.

  6. Run the following command to finish.
    ask deploy

Tests

Run the following commands at the root of the project to run your unit tests.

npm install
npm run test

alexa_skill_template's People

Contributors

dependabot[bot] avatar thornegladwin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.