Skip to content

sdebrosse/virtualize-weather

Repository files navigation

virtualize-weather

Demonstrates simulation using service virtualization to help with testing Alexa Skills and AWS Lambda functions. See this blog post for all the details.

Getting Started

This project was adapted from three repositories:

  1. 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.
  2. The slack-lambda-weather repository. See Ryan Ray's blog about setting integrating it with Slack.
  3. The aws-lambda-starter repository. See docs for more info on commands.

Prerequisites

  1. AWS CLI
  2. Execution Role ARN for your Lambda
  3. 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

Commands

  • npm run create EXECUTION_ROLE_ARN build and create your Lambda on AWS
  • npm run invoke {\"type\": \"sweet\"} invoke your deployed Lambda with inline json
  • npm run localInvoke invoke index.js with mock event json
  • npm run deploy build and deploy to AWS

Execution Role ARN(Amazon Resource Name)

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.

TODO

  • Fix the tests

About

Demonstrates simulation using service virtualization to help with testing Alexa Skills and AWS Lambda functions. See blog post for details (URL in README).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published