No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
dialogs
docs
lib
speechAssets
src
.gitignore
README.md
callLambda.js
package.json
testflow.js
tsconfig.json

README.md

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 ...)