Skip to content

WorthwhileGames/alexa-typescript-example

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
lib
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

A TypeScript Alexa Skill Example

Build and Test

  • npm install
  • npm run build
  • npm run test (node testflow.js)

aws-config.json

  • in order to run/test the code:
    • Copy data/aws-config-template.json and rename it aws-config.json
    • Edit the appId and cognitoIdentityPoolId fields
{
    "region": "us-east-1",
    "cognitoIdentityPoolId": "[your cognito identity pool id]",
    "appId": "[your skill's app id]",
    "alexaDynamoDBTableName": "MarketGuideDynamo",
    "lambdaFunctionNameForDBAccess": "MarketGuideLambdaDB"
}

testflow.js

AWS.config.update({
    region: "us-east-1"
});
  • requires that a Cognito identity pool be specified (not necessary when deployed)
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
    IdentityPoolId: '[your cognito identity pool id]'
});
  • requires a valid alexa skill/app id
var appId = '[your skill's app id]';

callLambda.js

  • Shows how to access the app/skill's DynamoDB using a vanilla (non-alexa) lambda

Speech Assets

  • these are not part of the lambda build process but are helpful when creating the skill
  • speechAssets/IntentSchema.json
  • speechAssets/InteractionModel.json (can be pasted into a new skill)
  • speechAssets/SampleUtterances.txt

Deploy

  • copy lib/index.js to the lambda code editor
  • (or set up the aws CLI ...)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published