From the course: Learning Amazon Web Services Lambda

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Adding CloudWatch Logs

Adding CloudWatch Logs

- [Instructor] CloudWatch comes with metrics and logs. In the previous video, we looked a little bit metrics that provides the Lambda function. Now, let's look at the logs. If you want to log something in your function, you already have done that by writing in your function code, console log and whatever you want to print. Console log, and then let's say, "Hello." Or you can also print the event object. Console log event. Let's deploy this and let's see what happens in the logs. So now, let's run this function from Postman a couple of times and let's check the logs. So here is my call from Postman. I will be just calling it. Then we can go back to our function. We can go to monitor, and here, we have the options to see the logs from here or the logs from here. Let's check first the logs from here, and then we do the ones from here. So this one will take you to CloudWatch logs. So if you open this, you'll find the…

Contents