aws lambda basic call

Solutions on MaxInterview for aws lambda basic call by the best coders in the world

showing results for - "aws lambda basic call"
Rafael
04 May 2016
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};