AWS CloudWatch Cost Optimization · Startup Guide

How to Reduce AWS CloudWatch Costs by 60–80%

CloudWatch log ingestion at $0.50/GB and unlimited retention are a silent budget drain for fast-growing startups. Most CloudWatch costs are avoidable with log level discipline, retention policies, and smarter query strategies.

$0.50/GB log ingestion
No default retention - logs grow forever
$0.005/GB for Logs Insights scans
ALB logs to CloudWatch: 20× overpayment

CloudWatch Pricing Breakdown

Cost itemPriceNotes
Log ingestion$0.50/GBPer GB of data ingested
Log storage$0.03/GB/monthPer GB stored; with no retention = forever
Logs Insights query$0.005/GB scannedCharged for data scanned, not data returned
Custom metrics$0.30/metric/monthFirst 10 metrics free
Dashboards$3.00/dashboard/monthFirst 3 free
Alarms$0.10/alarm/monthFirst 10 free
Contributor Insights$0.50/rule + $0.02/1M eventsProcessing fee per log event

4 CloudWatch Cost Optimizations

Start with log retention - it takes 30 minutes and stops unbounded growth immediately.

1

Set retention policies on all CloudWatch log groups

30 minutes · One-time setupSaves 20–60% on log storage costs

By default, CloudWatch log groups retain logs indefinitely. Every GB ingested stays forever at $0.03/GB/month - adding up silently over years. A startup ingesting 100GB/month with no retention policy accumulates 1,200GB/year of logs, costing $36/month just to store a year of logs that nobody reads.

How to implement

  1. List all log groups with no retention: aws logs describe-log-groups --query 'logGroups[?retentionInDays==null].logGroupName'
  2. Set retention to 30 days for application logs, 90 days for access logs, 365 days for audit/compliance logs
  3. AWS CLI: aws logs put-retention-policy --log-group-name /aws/lambda/my-function --retention-in-days 30
  4. For automation: use a Lambda or CloudFormation StackSet to enforce retention across all accounts
  5. Check existing groups with millions of stored events - deleting old log streams manually frees storage immediately

Note: This is a 30-minute fix that stops unbounded growth. Many startups we audit have log groups from 2–3 years ago still accumulating storage charges at full price.

2

Reduce log verbosity and filter before ingestion

2–8 hours · Code and configuration changesSaves 30–70% on ingestion costs

CloudWatch charges $0.50/GB for log ingestion. Verbose logging (DEBUG level in production, logging every request/response body, logging individual DB queries) is the primary driver of high ingestion costs. Reducing log level to INFO or WARN and filtering noise before sending to CloudWatch cuts ingestion costs proportionally.

How to implement

  1. Set production Lambda and ECS log levels to INFO (not DEBUG) - typically reduces volume 50–80%
  2. Use Subscription Filters to send only ERROR/WARN logs to CloudWatch; route DEBUG to S3 via Kinesis Firehose
  3. For Lambda: disable CloudWatch logging for high-volume functions that don't need it - set LoggingConfig LoggingType: None
  4. For ALB access logs: send to S3 directly instead of CloudWatch (S3 storage is 60× cheaper than CloudWatch logs)
  5. Use EMF (Embedded Metrics Format) for Lambda metrics instead of creating high-cardinality custom metrics

Note: ALB access logs to CloudWatch is a common mistake. At $0.50/GB ingestion, a busy load balancer generating 1TB/month of access logs costs $500/month in CloudWatch - the same data in S3 costs $23/month.

3

Disable unused CloudWatch dashboards and Contributor Insights

15 minutes · Console reviewSaves $5–50/month

Each CloudWatch custom dashboard costs $3/month. Each Contributor Insights rule costs $0.50/month + $0.02 per 1M log events processed. Most teams accumulate dashboards and rules created for one-time debugging sessions that never get cleaned up.

How to implement

  1. CloudWatch console → Dashboards → delete all unused/obsolete dashboards
  2. CloudWatch console → Contributor Insights → disable rules for log groups that no longer exist or are rarely viewed
  3. Review custom metrics: each unique metric with custom namespace costs $0.30/month
  4. High-resolution metrics (< 60s) cost 3× more - downgrade to standard resolution where sub-minute granularity isn't needed

Note: Small savings individually, but worth doing during a general cleanup. 50 unused dashboards = $150/month, 20 Contributor Insights rules processing 10M events/month = $4.50/month.

4

Switch from CloudWatch Logs Insights to Athena for ad-hoc queries

4–8 hours · Pipeline setupSaves 80–95% on log query costs

CloudWatch Logs Insights charges $0.005 per GB of data scanned. For teams querying large log volumes daily (security reviews, analytics, debugging), this accumulates quickly. Shipping logs to S3 and querying with Athena costs $5 per TB scanned - 100× cheaper than CloudWatch Logs Insights for the same data.

How to implement

  1. Create a CloudWatch Logs subscription filter to stream logs to Kinesis Firehose
  2. Configure Firehose to deliver to an S3 bucket with Parquet conversion enabled
  3. Create an Athena table over the S3 path with appropriate partitioning (year/month/day/hour)
  4. Query with Athena: $5/TB scanned vs. $0.005/GB = $5/TB for CloudWatch Logs Insights
  5. Keep CloudWatch Logs for real-time alerting; use Athena for historical analysis

Note: This architectural change takes a day to set up but pays back within weeks for teams running frequent ad-hoc log queries. The pipeline also enables long-term log archival to Glacier for compliance.

Frequently Asked Questions

Why is my CloudWatch bill so high?

Usually one of three things: log ingestion from verbose logging (DEBUG level in production, large request/response bodies), log storage from groups with no retention policy accumulating for years, or Logs Insights queries scanning large log volumes daily. Run Cost Explorer → Service: CloudWatch → Group by Usage Type to find the specific driver.

How do I set CloudWatch log retention for all groups at once?

Use a Lambda function triggered by a CloudWatch Events rule to enforce retention on all log groups. There are open-source solutions on GitHub (search 'cloudwatch-log-retention-lambda'). Alternatively, use AWS Config with a custom rule to detect and remediate log groups without a retention policy.

Is there a cheaper alternative to CloudWatch for application logs?

For long-term storage and querying: S3 + Athena is 10–100× cheaper than CloudWatch for bulk queries. For real-time alerting: CloudWatch Alarms remain the simplest option. For structured observability: consider OpenTelemetry with Grafana on ECS/EC2 if CloudWatch costs are significant.

What is the CloudWatch free tier?

10 custom metrics, 10 alarms, 3 dashboards, 5GB log ingestion/month, 5GB log storage, 3M API requests. After free tier: $0.50/GB ingestion, $0.03/GB storage, $0.30/metric, $0.10/alarm, $3/dashboard per month.

Should I disable CloudWatch logs for Lambda?

Only for very high-volume functions where logging adds cost without value (e.g., a function processing millions of events/day where you only care about errors). For most functions, keep logging enabled but at INFO level with a 30-day retention policy. Set LoggingConfig LoggingType: None in your Lambda configuration to fully disable.

Fixed-price · Risk-free · 3× ROI guarantee

CloudWatch costs growing with no clear reason?

The audit covers CloudWatch log ingestion, retention gaps, Logs Insights query costs, and unused metrics. Prioritized findings in 1 week.

Start the Audit →

No call needed · Accept agreements · Run one script · Done

Prefer to talk first? Free 30-min call available →