Using CloudWatch for Resource Monitoring

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

Welcome to this AWS hands-on lab about Using CloudWatch for Resource Monitoring!
This lab provides practical experience with creating and configuring multiple custom AWS CloudWatch dashboards and widgets.

The primary focus will be on the following features within CloudWatch:

1. CloudWatch Dashboards
1. Dashboard Widgets
1. CloudWatch Metrics

CloudWatch dashboards built with custom widgets allow you to visually monitor resources and proactively take action if needed. Overall, the dashboards give you a central (and visual) view of how your monitored resources are behaving at specific points in time.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a CloudWatch Dashboard for the DMZ Layer

Create a CloudWatch dashboard specific to the DMZ layer. After, set up a widget within the DMZ layer dashboard for the bastion host instance set to monitor the CPUUtilization metric.

  1. In the AWS Management Console, navigate to CloudWatch.
  2. Select Dashboards.
  3. Choose Create dashboard (Name your dashboard DMZLayer).
  4. Select a Line widget, then select Metrics.
  5. Select Configure.
  6. Under All Metrics > EC2 > Per-instance Metrics, enter CPUUtilization into the search bar. Find the bastion-host server row, select it, and configure the timeline to 15 minutes.
  7. Choose Create widget, then Save dashboard.
Create a CloudWatch Dashboard for the Application Layer

Create a separate CloudWatch dashboard with widgets displaying metrics specific to the Application layer.

  1. In the AWS Management Console, navigate to CloudWatch.
  2. Select Metrics > EC2> Per-instance Metrics. Find CPUUtilization, click on it, then choose Search for this only in the dropdown.
  3. Find the instance-wordpress rows and the database row, select them, configure the timeline to 15 minutes, and select Stacked area.
  4. Select Add to dashboard and create a new dashboard. Name your dashboard AppLayer and save it.
  5. Select > Add widget > Number > ApplicationELB > Per AppELB Metrics.
  6. Find RequestCount under Metric Name and click the down arrow next to the name. Select Search for this only from the menu.
  7. Select EC2 from the CloudWatch Management Console in the new tab.
  8. Select Load Balancers from the left-hand menu and click on the target group.
  9. Verify the identity of the correct load balancer by viewing the last few digits of the ARN.
  10. Select the corresponding load balancer in the CloudWatch Management Console tab.
  11. Select Create Widget > Save dashboard > Add widget.
  12. Repeat these steps that guided you in setting up the CPUUtilization metric for the instance-wordpress and database instances, but this time choose the NetworkIn metric.
Test the Widgets
  1. Copy the DNS name link and paste the link in a new tab.
  2. Create the login credentials, then install the WordPress site.
  3. Enter the credentials just created and log in to the site.
  4. Navigate back to the CloudWatch Management Console tab.
  5. Click on the refresh icon for the CPUUtilization dashboard.
  6. Click on the three dots in the top-right corner of the CPUUtilization dashboard and select Edit.
  7. Configure Auto refresh to 10 Seconds.
  8. Click Update widget.
  9. Verify you see updated metrics using your newly created widgets.

Additional Resources

Log in using the credentials provided to you. You should have been given a user name of 'cloud_user' and a randomly generated password.

When you log in, please make sure you are in the us-east-1 Region.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?