How to view logs from Lambda functions in AWS

Oscar de la Hera Gomez
Three flowers that represent AWS Lambda, API Gateway & Cloudwatch side by side. Beneath them sits the text "Lambda Function Logs".

A step by step tutorial on consulting console logs from Lambda functions using AWS CloudWatch log streams.

The following tutorial walks you through how to check the log stream of a Lambda function on AWS through AWS Cloudwatch. The tutorial uses the API that we produced as part of our Open Source Serverless & Typescript series, which are accessible through the links below.

Step One: Login to AWS

A screenshot showing you the AWS Login portal.

Go to aws.amazon.com and login to the account whose logs you are seeking to consult.

Step Two: Navigate to Lambda

A screenshot showing you how to use the AWS Console search bar to search for Lambda. This search bar is at the top of the website and where you use it to search for Lambda, Lambda will be the first option that appears under Services.

Using the AWS search bar at the top of the website, search for Lambda. When it appears in the search menu, select it to navigate to the AWS Lambda capability.

Step Three: Search for the function

A screenshot showing you how to search for the AWS Lambda function. The search bar appears in the middle left of the page and if you use it to search for your function, it should appear in the modal that below the searh bar under the values section.

Using the AWS Lambda search bar, search for the function that you are seeking to consult the logs for. When it appears, select it.

Step Four: Select Monitor

A screenshot of an AWS Lambda function that shows where the Monitor menu option appears. When the page loads, the Monitor menu option is located in the center right of the bottom of the screen, below the Function overview area.

From the menu below the Function Overview, select Monitor.

Step Five: Select View logs in Cloudwatch

A screenshot of an AWS Lambda function with the Monitor menu option selected. The View the CloudWatch logs is found in the center right part of the bottom of the screen, select it to be taken to the log streams for the AWS Lambda function.

In the layout that appears, select View logs in Cloudwatch.

Step Six: Select a log

A screenshot showing you an AWS CloudWatch page for an AWS Lambda. At the bottom of a Cloudwatch page you can find a section for Logstreams, below it sits a series of logs which are separated by timestamps and events. Select one to browse the logs for your AWS Lambda function.

In the page that appears, you will be able to consult all the log streams for the AWS Lambda function. These are broken down by events. Select the log stream that you wish to consult.

Step Seven: Analyze

A screenshot of the CloudWatch logs of the AWS Lambda API that we created using Typescript and Serverless. This screenshot serves as a Proof of Concept and highlights the Sample log that we created in the previous tutorials.

The page that appears shows the logs that were generated for an event (i.e. someone called the API) for that AWS Lambda function. As you can see from the screenshot above, this Log Stream logged our sample log that we generated as part of our proof of concept for alias paths in Serverless & Typescript.

Any Questions ?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.

delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details