Alexa responds with the count and anagrams for a requested word
"Alexa, ask anagrams for apple"
"Apple has 17 subanagrams: a, ale, ape, apple, la, lap, lea, leap, pa, pal, pale, pap, pea, peal, pep, plea"
Prerequisites: Node.js and AWS CLI installed
- Create an AWS Account and IAM User with the
AdministratorAccess
AWS Managed Policy - Run
aws configure
to put store that user's credentials in~/.aws/credentials
- Create an S3 bucket for storing the Lambda code and store its name in a shell variable with:
export CODE_BUCKET=<bucket name>
- Npm install:
npm install
- Build:
npm run build
- Upload package to S3, transform the CloudFormation template:
npm run package
- Deploy to CloudFormation:
npm run deploy
- Hit "Deploy" from the application page
- Open the AWS Console, and navigate to your lambda, copy the ARN
- Should be something like arn:aws:lambda:us-west-2:000000000000:function:dev-alexa-anagram-username-anagram-XXXXXXXXXXXXX
- Open the Amazon Developer Console
- Navigate to Alexa / Alexa Skills Kit/ Add a new Skill
- Fill in skill information
- Copy interaction-model.json in for the interaction model
- In Configuration, paste the copied ARN from Lambda
- In test, enter utterance "for apple" and hit Ask Anagram
The dictionary is 6of12.txt, with single-letter words other than "a" removed, along with all words containing non lowercase letters (e.g. proper nouns, hyphenations, contractions, etc.). See original information about 12dicts.
- alexa-anagram on Github
- alexa-anagram on the AWS Serverless Application Repository
© 2017-2019 Evan Chiu. This project is available under the terms of the MIT license.