npm install
npm run build
npm run test
(node testflow.js)
- webpack us used to build the
index.ts
anddata/aws-config.json
into one, bundled js file:dist/index.js
- this
dist/index.js
is then deployed (manually) to the skill's lambda - Note: in this example, tsc is also used to build
lib/index.js
, however this file is not complete because it does not contain thedata/aws-config.json
data
- 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]",
"skillLambdaName": "[your skill lambda name]",
"alexaDynamoDBTableName": "[your skill's dynamo db table name]",
"lambdaFunctionNameForDBAccess": "[name of the lambda function used to test DB access by callLambda.js]",
"thingARN": "[your thing's ARN]",
"thingEndpoint": "[your thing's HTTPS endpoint]",
"thingName": "[your thing's name]"
}
- provided by amazon in the alexa-cookbook repo
- invokes the intents specified in dialogs/default.txt
- requests a valid alexa skill/app id
var appId = '[your skill's app id]';
- Shows how to access the app/skill's DynamoDB using a vanilla (non-alexa) lambda
- subscribes to the mqtt endpoint and topic used by the thing's endpoint
- 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
- copy dist/index.js to the lambda code editor
- (or set up the aws CLI ...)