1. Home
  2. Training Library
  3. Compute (SAA-C03)

Monitoring your Lambda Function


SAA-C03 Introduction
EC2 Auto Scaling
ELB & Auto Scaling Summary
7m 37s
AWS Outposts and VMware Cloud
SAA-C03 Review

Instructor: Alana Layton

Monitoring your Lambda Function

Fortunately, monitoring and troubleshooting with Lambda is more straightforward than with some of the other AWS compute Services. That’s because a lot of important monitoring and logging metrics are already configured with CloudWatch by default and built into the Lambda dashboard. 

Let’s take a look at some of the default metrics that are provided to you through the service. I won’t get into every metric that Lambda supports but I will call out some of the main ones. There are three main categories of metrics:

  • Invocation metrics
  • Performance metrics 
  • And concurrency metrics 

Invocation Metrics

Invocation metrics are related to the outcome of the invocation. For example, there is a metric called invocations that tracks the number of times the function has been invoked. Similarly, in this category, you also have the errors metric which counts the number of failed invocations of the function. 

Performance Metrics

Performance metrics on the other hand, follow exactly what the name suggests, and provide performance details about an invocation. These metrics include duration, which measures how long the function runs in milliseconds from when it is invoked until it terminates. This category also supports the IteratorAge metric which is only used for stream-based invocations such as Amazon Kinesis. It measures in time how long Lambda took to receive a batch of records to the time of the last record written to the stream. This IteratorAge is measured in milliseconds.

Concurrency Metrics

Then the last category is concurrency metrics. Before we get into the metrics, let’s understand what concurrency is. When you want to monitor metrics for concurrency, you can use concurrent executions metric, which is a combined metric for all of your Lambda functions that you have running within your AWS account in addition to functions with a custom concurrency limit. It calculates the total sum of concurrent executions at any point in time. 


In addition to these metrics, CloudWatch also gathers log data sent by Lambda to help you better troubleshoot and understand issues. For each function that you have running, CloudWatch will create a different log group. 

The log group name will be prefixed with aws and lambda. When you look at Lambda logs, you’ll see details about your function execution. You can also add in custom logging statements to your function that will display in these logs. For example, if you add a print statement to a Python Lambda function, you will see the output of that print statement in these logs. This enables you to  push data to CloudWatch logs automatically in addition to the managed messages that are sent by default. 

If you want more information - check out the AWS documentation on monitoring with Lambda.

2h 37m

This section of the Solution Architect Associate learning path introduces you to the core computing concepts and services relevant to the SAA-C03 exam. We start with an introduction to the AWS compute services, understand the options available and learn how to select and apply AWS compute services to meet specific requirements. 

Want more? Try a lab playground or do a Lab Challenge

Learning Objectives

  • Learn the fundamentals of AWS compute services such as EC2, ECS, EKS, and AWS Batch
  • Understanding how load balancing and autoscaling can be used to optimize your workloads
  • Learn about the AWS serverless compute services and capabilities
About the Author
Learning Paths

Stuart has been working within the IT industry for two decades covering a huge range of topic areas and technologies, from data center and network infrastructure design, to cloud architecture and implementation.

To date, Stuart has created 150+ courses relating to Cloud reaching over 180,000 students, mostly within the AWS category and with a heavy focus on security and compliance.

Stuart is a member of the AWS Community Builders Program for his contributions towards AWS.

He is AWS certified and accredited in addition to being a published author covering topics across the AWS landscape.

In January 2016 Stuart was awarded ‘Expert of the Year Award 2015’ from Experts Exchange for his knowledge share within cloud services to the community.

Stuart enjoys writing about cloud technologies and you will find many of his articles within our blog pages.