A sample skill which demonstrates the use of consumables within an Alexa skill.
The skill will present the user with the name of an actor or actress, and the user is asked to guess which television show the skill is thinking of. If the user can't figure it out, they can buy and use hints, which will give them the name of a second or third actor from the same show.
This repository is still available as a point-in-time reference, but no further updates or support will be prioritized.
To use this sample:
- Ensure you have/complete the necessary prerequisites:
- Alexa Developer Account
- AWS Account
- Intial and initizalize the ASK CLI
- Install git (optional)
- Clone the repo:
git clone https://github.com/alexa/skill-sample-nodejs-name-the-show name-the-show
. If you don't have git installed, down the repo here - Enter the cloned repo's directory:
cd name-the-show
. - Deploy the skill:
ask deploy
- Since the skill uses persistent attributes, be sure to add these permissions to the Lambda function's execution role.
- If everything was left as the default, this link will take you right to that role.
- On the right side of the Permissions tab, click + Add inline policy.
- Click the JSON tab.
- Select the existing JSON and replace it with the following policy document. This policy grants access to the role to (1) create the needed table and (2) read/write items to the table. It is restricted to this for just a table named 'NameTheShow'.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "NameTheShowDynamoDBAccess", "Effect": "Allow", "Action": [ "dynamodb:CreateTable", "dynamodb:PutItem", "dynamodb:GetItem", "dynamodb:UpdateItem" ], "Resource": "arn:aws:dynamodb:*:*:table/NameTheShow" } ] }
- Click Review Policy.
- Enter
NameTheShowDynamoDBAccess
as the Name. - Click Create Policy.
- That's it! The skill should be enabled on your developer account. Launch the skill by saying, "Alexa, open name the show".
Note: the first time you launch it, the DyanmoDB table will be created. It is normal for an error to be returned while it is being created. Check back after a few minutes and the skill will work as expected.
This library is licensed under the Amazon Software License.