Giter VIP home page Giter VIP logo

awslambda_setmood's Introduction

Alexa Set The Mood

This is a side project to set the mood using my Alexa.

Setting up your Lambda Function

  1. Log into the AWS management Console. Create an account if you need to.
  2. From the list of services, select Lambda
  3. Set your region to US East (N. Virginia)
  4. Choose Create a Lambda Function
  5. In the search filter box, type Alexa
  6. Select blueprint alexa-skills-kit-color-expert-python
  7. Name your function. I call mine logWeight
  8. Under Lambda function handler and role, select Create a custom role.
  9. When the IAM role management console opens, choose Allow to go back to the previous Lambda console.
  10. The role should read lambda_basic_execution.
  11. In your IAM roles attach the AWSLambdaFullAccess policy to your role.
  12. Add environment variables. These give you access to Spotify. Note that the Alexa application id and the Alexa test application id are filtered.
    1. SPOTIPY_CLIENT_ID
    2. SPOTIPY_CLIENT_SECRET
    3. SPOTIPY_REDIRECT_URI
    4. SPOTIPY_SCOPE
    5. SPOTIPY_TOKEN_INFO
    6. ALEXA_APPLICATION_ID
    7. ALEXA_TEST_APPLICATION_ID
    8. SPOTIPY_DEVICE_ID
    9. SPOTIPY_CONTEXT_URI
    10. IFTTT_URI

Setting up your Amazon developer portal

  1. Sign into the Amazon Developer Portal.
  2. Select Alexa
  3. Under Alexa Skills Kit, choose Get Started
  4. Choose Add a New Skill
  5. Name your skill. It doesn’t really matter what it is.
  6. Create an invocation name. I set it to "set the mood" Note that there are limits to how you can invoke this skill. For example, you cannot (unfortunately) say “Alexa, I weigh 165 pounds”.
  7. Choose Next
  8. In the Intent Schema box, paste the following JSON code
{
  "intents": [
    {
      "intent": "SetTheMood"
    },
    {
      "intent": "AMAZON.HelpIntent"
    }
  ]
}
  1. Under the Sample Utterances enter
SetTheMood set the mood
  1. Choose Next
  2. Select the Endpoint AWS Lambda ARN then paste your ARN code from step 1-14. Select North America as your region, and for Account Linking select No, then choose Next.

Uploading the code

  1. AWS Lambda requires all python packages to be at the root file level.
  2. While within the project directory you can call ./install.sh to install all of the requirements.
  3. Zip up all of the files by running zip -r -X lambdaD.zip .
  4. Then upload the zipfile to your lambda function

Resources and Credit

awslambda_setmood's People

Contributors

jryoo avatar

Watchers

 avatar

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.