Lambda's logs in CloudWatch
So far, we have learned about and understood the metrics of AWS Lambda in great detail. Now, we will move on to understanding the logs of the Lambda functions. As always, we will try to understand them via the following steps:
- Logs for AWS Lambda functions are stored in CloudWatch's Logs service. You can access the CloudWatch Logs service by going to the
Logs
dashboard by clicking on the mainCloudWatch
dashboard.
- When you click on the logs ofthe
serverless-api
,/aws/lambda/serverless-api
, in the list, we go to the log stream of the serverless API, which looks like this:

- Each log stream here is a Lambda invocation. So, whenever your Lambda function is invoked, it creates a new log stream here. If the invocation is a part of Lambda's retry process, then the logs for that particular invocation will be written under the most recent log stream. A single log stream can contain several details. But firstly, let us look at what a particular log stream looks like:

- Also, if...