CLI Tool Reference
The Alexa Video Infrastructure CLI tool supports a set of commands to speed up video skill development for Echo Show.
Initializes the project and prompts the user for the following information:
Project Nameis the name of the project (this is used primarily to name created cloud resources)
Skill Nameis the name of the Alexa skill to create
Path to project rootis the absolute path to the directory containing the reference Lambda (
./lambda) and the reference web player (
ASK security profile client idis the client id associated with your ASK security profile
ASK security profile client secretis the client secret associated with your ASK security profile
AWS Access Keyis the AWS Access Key associated with your AWS IAM user
AWS Secret Access Keyis the AWS Access Key associated with your AWS IAM user
Authorization CodeVisit 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 IdIf 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:
~/.awsthere is a file with your AWS credentials stored within.
~/.askthere is a file with your ASK oauth tokens stored within.
- The file
<directory where cli is run>/.project-config.jsonstores project level information as well as your ASK client id and ASK client secret.
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:
- Open the Alexa Developer Console.
- Click on your skill to view or update your settings.
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
./dist/bin/alexa-video-infrastructure-cli --skill --disable-web-player-logs
Disable the web player from writing its logs to AWS CloudWatch Logs.
Gets the status of your deployed resources.
Shows the version of the CLI tool.
Shows all the available commands and descriptions.
Follow these guidelines for developing with the infrastructure CLI tool:
- Use the
npm run watch.
- While you make changes, the infrastructure CLI tool's code will be auto built.
- Test changes under