Coder Social home page Coder Social logo

solovino-instances-lambda's Introduction

Solovino Instances - 12/2017

Control EC2 instances from Alexa Skills throw a Lambda in Python

Autor: Mr.Jack

DEMO

Solovino Instances

Step 1 (Alexa Skill Kit)

  • Create a new Alexa Skill (https://developer.amazon.com/edw/home.html#/skills)
  • On your model create 3 Intents
    • getStatusIntent "status server {Instance}"
    • startInstanceIntent "start server {Instance}"
    • stopInstanceIntent "stop server {Instance}"
  • On your model create 1 Slot type: INSTANCE_NAME
    • Add 3 possible values: staging, prod, dev (you can add synonims)
  • {Instance} should be type INSTANCE_NAME

Step 2 (Lambda)

Step 3 (AIM Manager Console)

  • On IAM Manager Console create a new role (https://console.aws.amazon.com/iam/home?#/roles)
    • The role must have a policy like next:
      • (List) DescribeInstances - All resources
      • (List) DescribeInstanceStatus - All resources
      • (Write) StartInstances - All resources
      • (Write) StopInstances - All resources
  • Link the new role to your Lambda function

Step 4 (EC2)

  • Prepare your EC2 enviroments creating 3 instances
  • Each instance must have a tag 'enviroment' with the possible values staging, prod, dev

Step 5 (Testing)

  • Test your Alexa Skill on the tab Test > Service Simulator
  • For a better debugging, use the JSON Service Request and create a Test Event directly on Lambda
  • If everything is ok, test with your Amazon Echo Dot by using Skills Beta Testing (it requires all the configuration steps completed)

Step 6

  • Publish!! :D

solovino-instances-lambda's People

Contributors

ikarius6 avatar

Watchers

James Cloos avatar  avatar

Forkers

asidbackup

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.