In order to monitor your compute resources to ensure they are performing properly, you must record performance related metrics. In this simple lab, you were able to create an EC2 instance and generate a simulated high-load situation to observe how CloudWatch can be used to monitor those resources. These are important concepts that you should use across all of your compute resources to ensure you are meeting PERF7 - “How do you monitor your resources to ensure they are performing?"

Now that you know how to have an EC2 instance report its metrics to CloudWatch, you should define the Key Performance Indicators (KPIs) to measure workload performance. In some cases, such as a image rendering farm, a high-cpu may be a valid metric and not be indicative of performance. Once defined, you should establish CloudWatch alarms to ensure you are meeting your performance metrics.

Additional Tasks

In addition to the lab tasks, feel free to use this lab deployment to test some additional CloudWatch features:

  • Create a CPU or Memory alarm and test triggering the alarm by running the cpu_stress.ps1 script
  • Zoom into various timeframes on the CloudWatch dashboard. Notice how it will link the two charts together when you zoom in.
  • Use Metrics Explorer to look at other metrics deployed into the EC2 instance
  • Explore the CloudFormation template to see how the various CW Agent configurations were deployed

Remove all the resources via CloudFormation

  1. Go to the AWS CloudFormation console: https://console.aws.amazon.com/cloudformation
  2. Select the CloudFormation stack to delete and click Delete
  3. In the confirmation dialog, click Delete stack
  4. The Status changes to DELETE_IN_PROGRESS
  5. Click the refresh button to update and status will ultimately progress to DELETE_COMPLETE
  6. When complete, the stack will no longer be displayed. To see deleted stacks use the drop down next to the Filter text box.
  7. To see progress during stack deletion
    • Click the stack name
    • Select the Events column
    • Refresh to see new events

Delete the CloudWatch Dashboard

  1. Go to CloudWatch Dashboards
  2. Click the radio button next to the dashboard you created and then click Delete

References & useful resources

Now that you have completed the lab, if you have implemented this knowledge in your environment, you should re-evaluate the questions in the Well-Architected tool. This lab specifically helps you with PERF7 - “How do you monitor your resources to ensure they are performing?"