This lab is currently in Beta, content may be updated as we refine the material
LABINTERMEDIATE

CloudWatch Logs, Metric Filters, and Alarms

Convert Lambda ERROR log lines into a custom CloudWatch metric, alarm on the metric to SNS, and combine multiple alarms into a composite alarm for production-grade alerting.

60 minutes
aws/devops
CloudWatch Logs, Metric Filters, and Alarms - Platform Engineering Hands-On Lab Icon
Share this Lab

Lab Overview

Application logs contain the richest signal for what is going wrong, but raw log lines do not page on-call engineers. CloudWatch metric filters bridge that gap: they extract patterns from log groups and emit them as numeric metrics that alarms and dashboards can consume.

In this lab you will:

  • Deploy a Lambda function that emits a mix of INFO and ERROR-level structured logs and invoke it to generate log activity
  • Create a CloudWatch Logs metric filter on the Lambda log group that counts `ERROR` lines and publishes them as a custom metric
  • Create a CloudWatch alarm on that metric (>5 errors in 5 minutes), notify an SNS topic with an email subscription, and trigger the alarm by forcing more errors
  • Build a composite alarm that combines the error-count alarm with a Lambda duration alarm, then trigger both child alarms to watch the composite fire

Everything runs inside a TeKanAid-provisioned AWS lab account using only confirmed-tier services (Lambda, CloudWatch Logs, CloudWatch metrics and alarms, SNS, IAM).

What You'll Learn

Create a Lambda function with an IAM execution role and emit structured logs to CloudWatch Logs

Define a CloudWatch Logs metric filter that converts ERROR log lines into a custom metric

Create a CloudWatch metric alarm with an SNS action and email subscription

Combine multiple metric alarms into a composite alarm using rule expressions

Trigger alarm state transitions and verify end-to-end alerting

Prerequisites

aws-devops-cli-operations-baseline

basic-iam-and-lambda-familiarity

Technologies Covered

awscloudwatchcloudwatch-logsmetric-filteralarmscomposite-alarmsnslambdadop-c02monitoring

Choose your plan

Simple, Transparent Pricing

Unlock full access to TeKanAid courses, labs, and bootcamps

Buying for a team? Private corporate training is available for up to 15 learners.View team training
MonthlyQuarterly
Try Premium free for 7 days →

Just exploring? Start free below. Want the full experience? Try Premium free for 7 days (card required, $0 today).

Pro

All courses, with lab scripts to run on your own machine

$59/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Full access to all courses
  • Lab scripts to download and run on your own machine (hosted labs not included)
  • Progress tracking
  • Certificate of completion
  • Community access
  • Self-paced bootcamps
  • Premium puzzle library not included (5 free puzzles available)
  • New content access
Recommended

Premium

Full access, including unlimited hosted labs

$99/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Everything in Pro
  • Unlimited hands-on labs, fully hosted on TeKanAid Academy (nothing to set up)
  • Full access to the puzzle library
  • Lab AI Assistant
  • Priority support

Prefer a single course?

Purchase individual courses for a one-time fee of $79. Full access to course content, quizzes, certificates, and community features, lab access is not included.

Browse Courses

Just exploring? Start free, no account needed

Three free ways to start. All bridge into the paid Premium catalog when you're ready.

Not ready to commit? The crash course is email-only. No academy account required.

Ready to Get Started?

Start this hands-on lab and build real-world Platform Engineering skills

Get Access Now