Creating a Dashboard to Monitor your AWS Lambda function

Lab Steps

lock
Logging In to the Amazon Web Services Console
lock
Creating an AWS Lambda Function for Scheduling
lock
Scheduling an AWS Lambda Function Using Amazon EventBridge Scheduler
lock
Verifying Your AWS Lambda Function Is Running on a Schedule
lock
Creating a Dashboard to Monitor your AWS Lambda function
Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.

Introduction

Amazon CloudWatch allows you to create dashboards to monitor your applications and services. A dashboard is a collection of graphs and other widgets configured to display relevant information about your services or applications.

In this Lab Step, you will use CloudWatch to create a dashboard for your scheduled Lambda Function.

 

Instructions

1. Navigate to CloudWatch in the AWS Console.

 

2. Click Dashboards:

alt

 

3. To start creating a new dashboard, click Create dashboard:

alt

 

4. In the Dashboard name textbox, enter lab-dashboard and click Create dashboard:

alt

 

5. In the Add to this dashboard form, from the available widget types, select Line:

alt

A CloudWatch dashboard contains one or more widgets. Widgets can be graphs, numbers, or plain text. In this Lab Step, you are using a Line graph to display the number of invocations over time.

In a production scenario, you might have many dashboards, each configured to monitor parts of your infrastructure. Dashboards are useful for displaying the health of services and applications, with a well-configured dashboard you can get this information by quickly and efficiently just by looking at it.

 

6. In the Add to this dashboard box select Metrics:

alt

 

7. To open the time-range drop-down, click custom:

alt

 

8. In the minutes section, click 15:

alt

 

9. In the Metrics search box, type lab-function, and press enter:

alt

10. Click Lambda > By Function Name:

alt

 

11. In the list of metrics, check the box for the Invocations metric and click Create widget:

alt

 

Your dashboard will look similar to the following:

alt

 

12. To save the dashboard, click Save:

alt

 

Summary

In this Lab Step, you created a dashboard in CloudWatch and added a graph of your Lambda functions invocations to it.

This concludes the Lab where you used Amazon Lambda to create a simple function that monitors a website. You used Amazon EventBridge to run your Lambda function on a schedule once per minute. Finally, you used Amazon CloudWatch to verify that your Lambda was being run on a schedule.

Validation checks
1Checks
Created a CloudWatch dashboard

Check if the CloudWatch dashboard has been created

Amazon CloudWatch