CloudWatch Logs

Definition

AWS CloudWatch Logs is a service for monitoring, storing, and accessing log files from EC2 instances and other AWS services for better insights.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between CloudWatch Logs and CloudTrail?
CloudWatch Logs stores and lets you search operational logs (application logs, system logs, service logs). CloudTrail records AWS API activity (who did what, when, and from where) for auditing and security. Use CloudWatch Logs for debugging and performance troubleshooting; use CloudTrail for governance, compliance, and investigating account activity.
When should I use CloudWatch Logs?
Use CloudWatch Logs when you need a central place to collect logs from EC2, containers, Lambda, or AWS services; search and filter logs during troubleshooting; set retention policies; and create metric filters/alarms from log patterns (for example, alert when "ERROR" spikes). It’s especially useful when you have many instances or microservices and need consistent log access without logging into servers.
How much does CloudWatch Logs cost?
Pricing is mainly based on how much log data you ingest (write), store, and scan/query, plus any optional features you enable. Costs increase with high-volume verbose logs, long retention periods, frequent queries/insights, and cross-account/cross-region setups. To control cost, set appropriate retention, reduce noisy log levels, and avoid scanning large time ranges unnecessarily. Exact rates vary by region and change over time, so check the CloudWatch pricing page for current numbers.

Category: monitoring

Difficulty: intermediate

Related Terms

See Also