Distinguishing CloudWatch, CloudTrail and AWS Config
This lesson explains the three services that give visibility into an account: Amazon CloudWatch monitors performance, AWS CloudTrail records activity and AWS Config records configuration. Telling them apart is a classic exam question.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish CloudWatch, CloudTrail and AWS Config by the question each answers.
- Explain how the three services work together in an investigation.
Comparing the three
CloudWatch, CloudTrail and Config are often confused, but each answers a different question. Amazon CloudWatch answers "how is my system performing?". It collects metrics, such as an EC2 instance's CPU use, stores logs, displays dashboards and raises alarms that send notifications or take automatic action, such as adding servers.
AWS CloudTrail answers "who changed this?". It records the API calls made in an account, through the console, the command line or code, with who made each call, what it did, when and from where. AWS Config answers "what did this look like, and is it compliant?". It records the configuration history of resources and checks them against rules, such as "S3 buckets must not be public". The following table summarises the three services.
| Service | Answers | What it does |
|---|---|---|
| Amazon CloudWatch | "How is my system performing?" | Collects metrics (e.g. EC2 CPU), stores logs, shows dashboards, and raises alarms that notify via SNS or act automatically |
| AWS CloudTrail | "Who changed this?" | Records API calls: who did what, when and from where, via console, CLI or SDK. Event history keeps 90 days free; trails store logs in S3 long-term |
| AWS Config | "What did this look like, and is it compliant?" | Records resource configuration history and evaluates resources against rules, such as "S3 buckets must not be public" |
CloudWatch, CloudTrail or Config?
How they work together
Example. An instance was terminated unexpectedly. CloudWatch shows its metrics stopped, CloudTrail shows which user called TerminateInstances, and AWS Config shows the instance's configuration history.
The following diagram shows the question each service answers.

Investigating a deleted bucket
On Monday morning, an important S3 bucket has disappeared and the website's images are broken. Each service answers a different part of the investigation:
| Question | Service | Answer found |
|---|---|---|
| When did the website start failing? | CloudWatch | Error rate alarm triggered on Sunday at 22:14 |
| Who deleted the bucket? | CloudTrail | DeleteBucket called by user "j.smith" at 22:12 from the office IP address |
| What did the bucket's settings look like before? | AWS Config | Configuration history shows its policy and versioning settings |
To prevent a repeat, the company adds an AWS Config rule to check important buckets, restricts who may delete them with IAM, and enables versioning so deleted objects can be recovered.
Which service raises an alarm when an instance's CPU utilisation is high?
Show answer
Amazon CloudWatch, which collects metrics and triggers alarms.
Exam Tips
Remember for the exam
- To raise an alarm when CPU is high, use CloudWatch.
- To find out who terminated an instance or deleted a bucket, use CloudTrail.
- To track configuration changes and compliance with rules, use AWS Config.
- To collect and search application logs, use CloudWatch Logs.
- CloudTrail event history keeps 90 days of events at no charge.