December 2019
Intermediate to advanced
382 pages
9h 43m
English
First, we'll look at the handler function, the entry point for all Lambda functions. You choose your handler when creating the function. When the function executes, the service calls the handler function and passes in some event data and useful objects.
Let's have a look at the syntax for some handlers in different languages:
exports.handler = function(event, context, callback) { callback(null, "executed successfully");}
The following is the fat-arrow syntax:
exports.handler = (event, context, callback) => { callback(null, "executed successfully");}
def handler(event, context): return "executed successfully"
C# and Java are a little different compared to Node.js and Python.
First, you specify a return ...