Publish Custom CloudWatch Metrics and Raise an Alarm
Intermediate · 30 minutes · 5 tasks, checked automatically · 100 points
In this hands-on lab you will learn how to push application-level metrics into CloudWatch, organise them under a custom namespace, and wire up an alarm that fires when a threshold is crossed. You will work entirely against your local AWS sandbox — no real account or billing is involved. By the end you will have a working metrics pipeline: publish data points, inspect them, create an SNS topic to receive notifications, and configure a CloudWatch alarm that transitions to ALARM state when your metric exceeds a defined threshold.
What you’ll learn
- Publish custom metric data points to a CloudWatch namespace using the AWS CLI
- Create an SNS topic to serve as the alarm action notification target
- Configure a CloudWatch alarm with a threshold condition against the custom metric
- Trigger the alarm by publishing metric data that crosses the threshold and verify the state change
How this lab works
- Start the lab: One click starts an emulated cloud on your computer, with the cloud’s own CLI ready: no account and no bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads the emulated cloud’s resources and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: An emulated cloud on your computer: no cloud account, no bill
- Cloud: AWS
- Services: cloudwatch, sns
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop (or Podman / Rancher Desktop) installed and running
- A AWS sandbox created in the Local Cloud Playground
Topics: cloudwatch, metrics, alarms, sns, monitoring, observability, aws
Create a free account to start this lab.
Keep going
- Provision S3 and DynamoDB from a Single CloudFormation Stack
- Schedule a Recurring Cloud Scheduler Job That Publishes to Pub/Sub
- Push and Pull a Container Image with Azure Container Registry
- Run a Container Task on ECS with a Task Definition and Inspect Its Logs
- Split-Horizon DNS with Route 53 Public and Private Hosted Zones
- Create Your First S3 Bucket and Upload an Object