Skip to Main Content
Alexa Skills Projects
book

Alexa Skills Projects

by Madhur Bhargava
June 2018
Beginner to intermediate content levelBeginner to intermediate
250 pages
4h 41m
English
Packt Publishing
Content preview from Alexa Skills Projects

Coding the Lambda function

Following the Lambda setup, it's time to code the actual Lambda function. We will be editing the code inline, in the index.js file on the Developer Portal itself, following these steps:

  1. Implement the handling of events in exports.handler.  Our Lambda, in this case, will be handling only a single intent, that isOneShotFetchTemperatureIntent. Since we are implementing a One-Shot Launch, this single intent will launch our skill and fetch the temperature data.

Before we move on to write the functional logic, declare the following variables, which will be used by our functional logic:

var https = require('https');var firebaseHost = "androidwarehousemonitor.firebaseio.com";

firebaseHost is the same URL (it may ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-on Building Alexa Skills

Hands-on Building Alexa Skills

Paul Hickey

Publisher Resources

ISBN: 9781788997256Supplemental Content