Demonstrates simulation using service virtualization to help with testing Alexa Skills and AWS Lambda functions. See this blog post for all the details.
This project was adapted from three repositories:
- Brian's Donohue's Build your First Alexa Skill. You can take a look at his blog for details about getting started with developing Alexa Skills.
- The slack-lambda-weather repository. See Ryan Ray's blog about setting integrating it with Slack.
- The aws-lambda-starter repository. See docs for more info on commands.
- AWS CLI
- Execution Role ARN for your Lambda
- Add any necessary elements and values to
config.json
. Although this project doesn't require anything, this is where you would put any api key's and other secret info that your lambda may need.
To run tests you'll want to install jasmine and watch globally
npm install -g jasmine watch
Then you can run tests while watching files for changes:
npm run test:watch
npm run create EXECUTION_ROLE_ARN
build and create your Lambda on AWSnpm run invoke {\"type\": \"sweet\"}
invoke your deployed Lambda with inline jsonnpm run localInvoke
invoke index.js with mock event jsonnpm run deploy
build and deploy to AWS
Before you can create your Lambda you need to create an execution role. If you did any of the Lambda hello world tutorials in the AWS console you should already have a role created. Either way you need to goto the AWS Console -> Security & Identity -> IAM -> Roles. Get the ARN of lambda_basic_execution
or create a new role based on role.example.json
and get the ARN from that. The full ARN looks something like arn:aws:iam::YOUR_ACCOUNT_ID:role/lambda_basic_execution
.
- Fix the tests