← Back to Home

Cloud Monitoring

AWS CLF-C02 — CloudWatch, CloudTrail, X-Ray, Health Dashboard, CodeGuru, Trusted Advisor

Amazon CloudWatch Metrics

CloudWatch provides metrics for every AWS service. A metric is a variable to monitor (e.g., CPUUtilization, NetworkIn).

Key Concepts

EC2 Monitoring

Monitoring TypeIntervalCost
Basic MonitoringEvery 5 minutesFree
Detailed MonitoringEvery 1 minuteAdditional cost

Custom Metrics

Exam Tip:

EC2 default monitoring = 5 min. Detailed = 1 min (costs more). RAM is NOT a default metric — it must be a custom metric. This is a very common exam question!

CloudWatch Alarms

Trigger notifications and automated actions based on metric thresholds.

Alarm States

Alarm Actions

Action TypeExamples
Auto ScalingIncrease or decrease EC2 instances in an ASG
EC2 ActionsStop, terminate, reboot, or recover an EC2 instance
SNS NotificationsSend notifications (email, SMS, Lambda trigger, etc.)
Key Point:

CloudWatch Alarms can trigger 3 types of actions: Auto Scaling, EC2 instance actions, and SNS notifications. Billing alarms help you avoid surprise AWS charges.

CloudWatch Logs

Centralized logging service for collecting, monitoring, and analyzing log files from AWS services and applications.

Key Features

Log Sources

CloudWatch Logs Insights

Exam Tip:

CloudWatch Logs = centralized log collection. The CloudWatch Agent must be installed on EC2 instances to push logs. Logs Insights lets you query logs with SQL-like syntax.

Amazon EventBridge (CloudWatch Events)

EventBridge is the successor to CloudWatch Events. A serverless event bus for building event-driven applications.

Event Sources

Event Targets

Key Point:

EventBridge = react to AWS events + schedule cron jobs + integrate with SaaS partners. It's the recommended way to build event-driven architectures on AWS (replacing CloudWatch Events).

AWS CloudTrail

Provides governance, compliance, and audit for your AWS account. Records every API call made in your account.

Key Features

Event Types

Event TypeDescriptionExamples
Management EventsOperations on AWS resources (control plane)Configuring security (IAM), setting up logging (CloudTrail), creating subnets (VPC). Logged by default.
Data EventsOperations on data within resources (data plane)S3 object-level activity (GetObject, PutObject), Lambda function executions. NOT logged by default (high volume).
Insights EventsDetect unusual activity automaticallyBursts of IAM actions, gaps in periodic maintenance, spikes in provisioning. Uses ML to detect anomalies.

CloudTrail Insights

Exam Tip:

CloudTrail = "Who did what?" Audit trail of API calls. If someone deleted a resource and you need to find out who — check CloudTrail. Enabled by default. Data events cost extra and are not enabled by default.

AWS X-Ray

Distributed tracing service for analyzing and debugging distributed applications (e.g., microservices).

Key Features

Advantages

Exam Tip:

X-Ray = distributed tracing, visual service map, debug microservices. If the question mentions "trace requests across services" or "debug a distributed application," think X-Ray.

AWS Health Dashboard

Service Health Dashboard

Your Account Health Dashboard (Personal Health Dashboard)

Key Point:

Service Health = all AWS services, all regions (general). Your Account Health = only YOUR resources, personalized alerts. If the exam says "be notified when an AWS service impacts my resources," think Personal Health Dashboard.

Amazon CodeGuru

ML-powered service for automated code reviews and application performance recommendations.

CodeGuru Reviewer

CodeGuru Profiler

Exam Tip:

CodeGuru Reviewer = automated code reviews (find bugs). CodeGuru Profiler = runtime performance optimization (find expensive code). Both use ML.

AWS Trusted Advisor

An online tool that provides real-time recommendations to help you follow AWS best practices. It inspects your AWS environment at the account level.

Five Pillars of Recommendations

PillarWhat It ChecksExamples
Cost OptimizationIdentify ways to reduce costIdle load balancers, unassociated Elastic IPs, low-utilization EC2 instances, Reserved Instance optimization
PerformanceImprove application performanceHigh-utilization EC2 instances, CloudFront CDN optimization, overprovisioned EBS
SecurityImprove security postureMFA on Root Account, IAM password policy, S3 bucket permissions, security groups with unrestricted access (0.0.0.0/0)
Fault ToleranceIncrease availability and redundancyEBS snapshots, RDS Multi-AZ, Auto Scaling Groups across AZs
Service LimitsCheck if you're approaching service quotasVPC, IAM, EBS, RDS limits (warns at 80% of limit)

Checks by Support Plan

Support PlanAvailable Checks
Basic & Developer7 core checks only:
• S3 Bucket Permissions
• Security Groups — Specific Ports Unrestricted
• IAM Use (at least one IAM user created)
• MFA on Root Account
• EBS Public Snapshots
• RDS Public Snapshots
• Service Limits
Business & EnterpriseFull set of checks across all 5 pillars + AWS Support API access + ability to enable weekly notifications
Exam Tip:

Trusted Advisor = account-level best practice checks (5 pillars). Basic/Developer support = only 7 core checks. Business/Enterprise = ALL checks. If the exam asks "check if MFA is enabled on root" or "identify underutilized resources," think Trusted Advisor.

Monitoring Services Summary

ServicePurposeThink Of It As
CloudWatch MetricsMonitor AWS resource metrics"How is my resource performing?"
CloudWatch AlarmsTrigger actions on metric thresholds"Alert me when CPU > 90%"
CloudWatch LogsCentralized log collection"What did my application log?"
EventBridgeReact to events, schedule cron jobs"When X happens, do Y"
CloudTrailAudit API calls"Who did what and when?"
X-RayDistributed tracing"Where is the bottleneck in my microservices?"
Health DashboardAWS service status & personal alerts"Is AWS broken? Does it affect me?"
CodeGuruML code reviews & performance"Is my code efficient and bug-free?"
Trusted AdvisorBest practice recommendations"Am I following AWS best practices?"