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

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

MonthlyQuarterly

Pro

Course content without labs

$59/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Full access to all courses
  • Progress tracking
  • Certificate of completion
  • Community access
  • Bootcamp participation
  • New content access
Recommended

Premium

Full access with hands-on labs

$99/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Everything in Pro
  • Unlimited hands-on labs
  • Lab AI Assistant
  • Accelerator bootcamps with live office hours
  • 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

Try it free, no credit card

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