AWS · Comparison

CloudTrail vs Config vs CloudWatch

Which service answers my monitoring or audit question: CloudTrail, AWS Config or CloudWatch?

Decision summary

Ask what you want to know:

  • "Who did what, and when?" (API calls, sign-ins): CloudTrail.
  • "What did this resource look like, did it change, is it compliant?": AWS Config.
  • "How is it performing, and alert me when something is wrong" (metrics, logs, alarms): CloudWatch.

They work together: Config links each change to the CloudTrail event that caused it, and CloudTrail can send events to CloudWatch Logs for alarms.

Best fit for each option

CloudTrail

Auditing API activity, security investigations, compliance evidence of who changed what.

AWS Config

Configuration history, compliance rules and automatic remediation of misconfigurations.

CloudWatch

Metrics, logs, dashboards and alarms for operations and performance.

Side by side

 CloudTrailAWS ConfigCloudWatch
Best forWho called which API, when, from whereResource configuration and compliance over timePerformance metrics, logs and alarms
SecurityAudit evidence; integrity validationCompliance rules and remediationAlarms on suspicious patterns from logs
Limits90 days of event history without a trailRules and conformance pack quotas per accountMetric resolution decreases over 15 months
CostFirst management-event trail free; data events and Lake chargedPer configuration item and rule evaluationCustom metrics, logs, alarms and queries

Scaling and topology

Someone changesa security groupCloudTrailWHO did WHAT, WHEN (API call)AWS ConfigWHAT it looked like before/afterS3 + log validationCloudTrail Lake for SQLConfig rule: NON_COMPLIANT→ auto-remediate
CloudTrail records the API call; Config records the resource's configuration and judges compliance

Limits and constraints

ItemValueContextSource
CloudTrail event history 90 days of management events Source
checked
CloudWatch 1-hour metric retention 455 days (15 months) Source
checked

Quotas and limits change. Check the linked source before designing around a number.

When to avoid each option

CloudTrail

  • Performance monitoring or configuration compliance.

AWS Config

  • Finding who made a change (use the linked CloudTrail event).

CloudWatch

  • Audit trails of API calls.

Example scenarios

SituationChooseWhy
Find who terminated a production instance.CloudTrailThe TerminateInstances call is in CloudTrail.
Prove all S3 buckets stayed encrypted all year.AWS ConfigConfiguration history and compliance rules.
Get paged when API latency rises.CloudWatchA CloudWatch alarm on the latency metric.

Exam cues

  • Who: CloudTrail. What changed / compliant: Config. How it performs / alert: CloudWatch.

Service pages

Related

Courses and lessons

Services, comparisons and patterns

Sources

Independent study material, not affiliated with or endorsed by Amazon Web Services.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake