You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Understanding how to monitor your AWS resources and manage costs is just as important as knowing how to build with them. AWS provides comprehensive tools for observability, alerting, and cost management.
CloudWatch is the primary monitoring and observability service in AWS. It collects metrics, logs, and events from AWS resources.
CloudWatch automatically collects metrics from AWS services:
| Service | Example Metrics |
|---|---|
| EC2 | CPU utilisation, network in/out, disk reads/writes |
| RDS | Database connections, read/write latency, free storage |
| S3 | Number of objects, bucket size, request count |
| Lambda | Invocations, duration, errors, throttles |
CloudWatch Alarms let you define thresholds and take action when metrics exceed them:
Example alarm: If EC2 CPU utilisation exceeds 80% for 5 minutes, send an email via SNS.
CloudWatch Logs collects and stores log files from:
You can search, filter, and create metrics from log data.
CloudWatch Dashboards provide customisable visualisations of your metrics. You can create dashboards that show:
While CloudWatch monitors performance, CloudTrail monitors activity. CloudTrail records API calls made to your AWS account.
RunInstances, CreateBucket)CloudTrail stores events for 90 days by default. For longer retention, configure a trail to deliver logs to an S3 bucket.
Most AWS services follow one of these pricing models:
| Model | Description | Example |
|---|---|---|
| Pay-as-you-go | Pay only for what you use | EC2 on-demand, Lambda |
| Reserved | Commit for 1-3 years for discounts | EC2 Reserved Instances |
| Volume-based | Price decreases as usage increases | S3 storage tiers |
| Free tier | Free usage within limits | 750 hrs EC2 t2.micro/month |
The Billing Dashboard shows:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.