Query and Export AWS CloudWatch Metrics for Long Term Storage and Analysis
In this lab, you’ll practice using CloudWatch to gain a deeper understanding of your AWS services. When you’re finished with this lab, you’ll have several strategies for examining and interpreting the behavior of your resources and applications.
Terms and conditions apply.
Lab info
Lab author
Challenge
Create Lambda Functions to Monitor
Set up two Lambda functions that will output logs and metrics to CloudWatch. The first function will be for downloading text-based files, and the second function will be for downloading image-based files.
Challenge
Aggregate Metrics Produced by Triggering Lambda Functions
Trigger the two Lambda functions you created in the previous challenge repeatedly, sending data to CloudWatch as a result. Use the CloudWatch console to see an aggregated view of the metrics sent in across these functions.
Challenge
Uncover Linear Progression and Anomaly Patterns in Metrics
Further utilize the graphing capabilities in the CloudWatch console to look at the duration values for each function separately now, and begin to deduce informative patterns based on these observations.
Challenge
Use CloudWatch Logs Insights to Track Down Potential Issues
Query, view, and analyze the logs sent to CloudWatch by your Lambda functions as a way to gain more information about the patterns you observed from the metrics in the previous challenge.
Challenge
Filter Logs Using Insights Query Language to Correlate Data across Dimensions
Build upon your knowledge of CloudWatch Logs Insights query language to use scoping and filtering to dig in and determine the potential root cause of why your image file download function is occasionally spiking and acting erratically.
Challenge
Exporting CloudWatch Logs to S3 For Further Future Analysis
Start exporting the logs for your Lambda functions to S3 in order to later be able to do more extensive analysis and querying on them, as well as save money over time with less expensive storage.
Challenge
Modify CloudWatch Log Group Retention Policies for Cost Optimization
Reduce the retention duration for the log groups associated with your Lambda functions in order to save on storage costs over time.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.
Recommended prerequisites
- Linux CLI and Python familiarity