1// Define handler function, the entry point to our code for the Lambda service
2// We receive the object that triggers the function as a parameter
3exports.handler = async (event) => {
4 // Extract values from event and format as strings
5 let name = JSON.stringify(`Hello from Lambda, ${event.firstName} ${event.lastName}`);
6 // Create a JSON object with our response and store it in a constant
7 const response = {
8 statusCode: 200,
9 body: name
10 };
11 // Return the response constant
12 return response;
13};