CloudWatch vs. CloudTrail vs. Config

Get a comparison between the CloudWatch, CloudTrail, and Config services and how each of them contributes to auditing and compliance management.

In this lesson, we’ll compare the CloudWatch, CloudTrail, and Config services. We’ll explore in which scenarios we should use what service.

Press + to interact

We’ll review how each of them contributes to the auditing and compliance management of AWS resources.

Comparing CloudWatch, CloudTrail & Config

Here’s a general breakdown of what each of these services does:

  • AWS CloudWatch:

    • CloudWatch primarily monitors the performance and status of any AWS services and resources.

    • CloudWatch also provides different dashboards for performance monitoring for different AWS resources on the AWS Management Console.

    • CloudWatch monitors performance by collecting and tracking resource metrics of the resources.

    • We can use alarms with CloudWatch to detect certain events and trigger the appropriate actions and notifications in response.

    • CloudWatch Logs can collect and monitor log files for different AWS resources or even other resources by installing the CloudWatch Logs agent on them.

    • CloudWatch can also aggregate logs, which we can use for analysis.

    • The scope of the CloudWatch service is region-specific.

  • AWS CloudTrail:

    • CloudTrail Event History primarily monitors and records any activity in the form of API calls made by anyone within our AWS account.

    • CloudTrail Event History is immutable and, hence, excellent for auditing purposes.

    • We can set up CloudTrail trails to monitor specific resources.

    • CloudTrail primarily focuses on AWS API calls made within an AWS account.

    • CloudTrail is a global service.

  • AWS Config:

    • Config primarily monitors and records any configuration changes in resources.

    • We can set up Config rules to evaluate if resources are compliant.

    • Config also provides a timeline of any configuration changes and compliance of resources.

    • The scope of the Config service is region-specific.

The following diagram illustrates a comparison chart for the CloudWatch, CloudTrail, and Config services:

Press + to interact
Comparison chart
Comparison chart

CloudWatch allows us to be proactive with alerts and automate performance-issue responses. CloudTrail and Config are more reactive, providing insights after the occurrence of an event, which is crucial for troubleshooting and security analysis.

Take a short test to validate your knowledge of when to use what service:

Match The Answer
Select an option from the left-hand side

Ensure an e-commerce website hosted on an AWS EC2 instance runs smoothly, particularly during high-traffic events like sales or holidays.

AWS Config

There’s an unexpected change in the website’s storage configuration, and we need to find out who made this change and when.

AWS CloudWatch

We must ensure that all AWS resources comply with specific security standards, such as having encryption enabled on all databases and proper access controls on S3 buckets.

AWS CloudTrail

We’ve deployed a video streaming service on AWS, and we need to continuously monitor its performance to ensure a smooth user experience.


Example: Monitoring and auditing of EC2

Even though the CloudWatch, CloudTrail, and Config services perform different actions, they can also complement each other. CloudWatch focuses on performance monitoring, CloudTrail on user activity and API usage, and Config on configuration management and compliance. Together, they provide a complete birds-eye view of our EC2 instance’s operation, security, and compliance posture.

Let’s explore an example scenario of how each of these services can monitor and audit an EC2 instance with a website deployed on it. Here’s a breakdown of how CloudWatch, CloudTrail & Config services can monitor the EC2 instance:

  • CloudWatch:

    • It can track metrics for CPU utilization, network bandwidth, disk throughput, and others that help understand the resource usage and performance characteristics of our server hosting the website.

    • We can visualize any error codes as a percentage over time.

    • Set up CloudWatch alarms to get notified when certain thresholds are breached, for example, low available disk space. This is critical for proactively managing the health and performance of our application on the EC2 instance.

  • CloudTrail:

    • Track and log who stopped or started the EC2 instance, changed security group rules, or modified instance settings.

  • Config:

    • It allows us to review historical configurations and understand how they have changed over time.

    • We can use AWS Config to ensure that the EC2 instance complies with our organization’s policies and best practices. For example, it can verify that only authorized AMIs are used or that security groups are correctly configured and don’t provide unrestricted access.


In summary, AWS CloudWatch, CloudTrail, and Config offer a comprehensive suite for monitoring, auditing, and ensuring compliance in AWS environments. While CloudWatch excels in real-time performance monitoring, CloudTrail provides detailed user activity logs, and Config tracks and manages resource configurations, together ensuring a robust and secure AWS infrastructure.

Get hands-on with 1300+ tech skills courses.