The Lambda Programming Model
Learn how the AWS Lambda programming model works by examining the lambdaHandler function in Node.js, how it processes HTTP events, and the use of async-await patterns. Understand the event and context objects, response requirements for API Gateway, and differences in typed versus untyped language interfaces.
We'll cover the following...
We'll cover the following...
lambdaHandler
In the sample template, the combination of CodeUri , Handler , and Runtime means that the Lambda environment will try to execute the code using Node.js version 24 by calling the function called lambdaHandler inside app.mjs in the hello-world directory.
Next, you’ll have a look at that file and inspect it, so you can see how Lambda responds to HTTP requests. That file will look similar to the following code:
Note that SAM ...