We will create a Lambda function for the backend of your API. This Lambda function creates, reads, updates, and deletes items. The function uses events from API Gateway to determine how to perform crud operations.
Goto Console — Lambda — Choose Create function. — For Function name, enter productFunction — Choose Create function.
The example function returns a 200 response to clients, and the text Hello from Lambda. The default Lambda function code should look similar to the following: And please add logging line of code: