O'Reilly logo

Practical Internet of Things with JavaScript by Arvind Ravulavaru

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining the lambda function

Now that the voice model is trained and we have a public URL to access the API engine, we are going to write the required service to respond to the user's interactions.

When a user goes, Alexa, ask smarty app the weather report, Alexa will make a request to the AWS lambda function and the lambda function will call the API engine for appropriate activity.

Quoting from AWS: https://aws.amazon.com/lambda/details/

The AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required