Skip to content

Instantly share code, notes, and snippets.

@seth10
Last active November 26, 2016 13:53
Show Gist options
  • Select an option

  • Save seth10/cc97815b06ed7db7d9b1c20529478e53 to your computer and use it in GitHub Desktop.

Select an option

Save seth10/cc97815b06ed7db7d9b1c20529478e53 to your computer and use it in GitHub Desktop.
The most simple AWS Lambda function for handling an Alexa request with the new Alexa Node.js SDK
'use strict';
var Alexa = require('alexa-sdk');
var APP_ID = 'amzn1.ask.skill.5f3759df-5f37-59df-5f3759df5f37';
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.APP_ID = APP_ID;
alexa.registerHandlers(handlers);
alexa.execute();
};
var handlers = {
'GetCurrentMapsIntent': function () {
this.emit(':tell', 'The current maps are Flounder Heights and Moray Towers.'); // not really but they do seem to always be on
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment