Developer Console

CLI Tool Reference (VSK Echo Show)

The Alexa Video Infrastructure CLI tool supports a set of commands to speed up video skill development for Echo Show.

Supported Commands

./dist/bin/alexa-video-infrastructure-cli --init

Initializes the project and prompts the user for the following information:

  • Project Name is the name of the project (this is used primarily to name created cloud resources)
  • Skill Name is the name of the Alexa skill to create
  • Path to project root is the absolute path to the directory containing the reference Lambda (./lambda) and the reference web player (./web-player) code
  • ASK security profile client id is the client id associated with your ASK security profile
  • ASK security profile client secret is the client secret associated with your ASK security profile
  • AWS Access Key is the AWS Access Key associated with your AWS IAM user
  • AWS Secret Access Key is the AWS Access Key associated with your AWS IAM user
  • Authorization Code Visit the prompted website that will ask you to log in and then issue you a single use Authorization Code. This code will generate an OAuth access token and refresh token. That token is used to authenticate your Alexa Developer Account for API calls. It expires eventually, and if this happens, you will be prompted to create a new token.
  • Vendor Id If you have multiple vendor Ids associated with your ASK account, you get an additional prompt to select the one you would like to apply. You can always retrieve this data from this page on the developer console.

Note that the CLI tool stores information on your local machine:

  • Under ~/.aws there is a file with your AWS credentials stored within.
  • Under ~/.ask there is a file with your ASK oauth tokens stored within.
  • The file <directory where cli is run>/.project-config.json stores project level information as well as your ASK client id and ASK client secret.

./dist/bin/alexa-video-infrastructure-cli --deploy

Run this command once to create the skill for the first time. For a given Project Name, you can only run the --deploy command once. If the command fails, you can run the --delete command and then re-run the --deploy command, but note this will delete your skill. If you want to update the web player or the Lambda, you can run the --update --web-player or --update --lambda commands respectively.

Deploy/Update the skill performs the following:

  • Creates the artifact stack
  • Starts copying over sample video content in the background
  • Builds the reference Lambda and web player package locally
  • Uploads the newly built Lambda and web player to S3
  • Creates the Lambda CloudFormation Stack
  • Creates the Alexa Skill by uploading a skill manifest
  • Configures account linking and skill triggers

View your newly created skill by following this process:

  1. Open the Alexa Developer Console.
  2. Click on your skill to view or update your settings.

./dist/bin/alexa-video-infrastructure-cli --delete

Deletes the entire skill, all data, S3 buckets, and so on.

./dist/bin/alexa-video-infrastructure-cli --update --lambda

This updates just the Lambda:

  • Builds the Lambda locally
  • Uploads it to S3
  • Updates the Lambda source code

./dist/bin/alexa-video-infrastructure-cli --update --web-player

This updates just the web player. It builds the web player locally and uploads it to the S3 bucket.

./dist/bin/alexa-video-infrastructure-cli --skill --enable-web-player-logs

You do not have access to the logs produced by the web player because it runs on device. By running this command, your web player writes its logs to AWS CloudWatch Logs. You can view your logs in the CloudWatch Logs section of the AWS console. The logs are located within a log group named after your Project Name.

./dist/bin/alexa-video-infrastructure-cli --skill --disable-web-player-logs

Disable the web player from writing its logs to AWS CloudWatch Logs.

./dist/bin/alexa-video-infrastructure-cli --status

Gets the status of your deployed resources.

./dist/bin/alexa-video-infrastructure-cli --version

Shows the version of the CLI tool.

./dist/bin/alexa-video-infrastructure-cli --help

Shows all the available commands and descriptions.


Follow these guidelines for developing with the infrastructure CLI tool:

  • Use the <project root>/infrastructure folder.
  • Run npm run watch.
  • While you make changes, the infrastructure CLI tool's code will be auto built.
  • Test changes under ./dist/bin/alexa-video-infrastructure-cli

Last updated: Oct 29, 2020