O'Reilly logo

Hands-On Chatbot Development with Alexa Skills and Amazon Lex by Sam Williams

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

Writing your Lambda function's code

Once you've created your Lambda you are sent into the function editor within the Lambda Management Console. There is a lot going on this page, but we're focused on the section titled Function code.

When you first create a Lambda, it is created with a very basic function already implemented. This is nice as it gives you a starting point to build your function on. As we're using Node.js 8.10 as our runtime, there will be a single parameter of the event and then we will return our answer.

As a basic example, we'll create a Lambda that takes your name and age and tells you what your maximum heart rate is. This can be done more efficiently than the way we are going to do it, but this is done more as a way to ...

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