Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 2.17 KB

README.md

File metadata and controls

40 lines (25 loc) · 2.17 KB

Alexa Cookbook

External Calls


Intro

Alexa skill developers can take advantage of external APIs and services available within AWS and on the Internet. Skill code could perform a lookup in a file or database, or make a REST call to a third-party service, to retrieve information the user requests, or to transmit a message to another user or application.

We can design special functions to simplify the process of sending and receiving data from a service. The service function will hide all the details of the function call and allow us to simply send and receive data. The examples here assume your skill code is written as a Lambda Node.js function. A series of individual functions is provided. You can copy and paste the code, or add the individual source files to your project with the "require" directive within your main code file. For details on "require", see Node.js modules docs

Functions

Skill code can use the built-in HTTPS module to make service POST and GET calls. See the HTTPS reference docs.

Skill code can make use of the AWS SDK for Javascript in Node.js. This Node module is automatically included and available to AWS Lambda functions. See the AWS SDK reference docs.

Lambda functions that call out to other AWS services such as S3 require additional permissions, beyond those in the default Lambda Basic Execution role. Read more about Lambda IAM Roles & Policies, or add policy permissions to your role in the IAM Role Console

Testing

These function modules can be tested by adding them to an existing skill, or individually via your local command line.

For details, see the TEST project folder.

Back to the Home Page