Updated October 3, 2026

Guides · CloudWatch

CloudWatch Logs cost: ingestion, storage and retention

CloudWatch Logs bills twice: once when log data comes in, and again every month for as long as it's kept. By default, AWS keeps log data indefinitely. A log group with no retention setting is billed for storage on everything it has ever received, and that line grows every month. Setting retention stops the growth. For most accounts, though, ingestion is the bigger charge.

The prices (us-east-1)

ChargePrice
Ingestion, Standard log class$0.50 / GB
Ingestion, Infrequent Access log class$0.25 / GB
Vended logs from AWS services, Standard class: $0.50 for the first 10 TB a month, then $0.25, $0.10 and $0.05 above 50 TB$0.50 to $0.05 / GB
Storage$0.03 / GB-month, compressed
Logs Insights queries$0.005 / GB scanned

The CloudWatch free tier includes 5 GB of log data, counting ingestion, storage and data scanned by Logs Insights queries.

Why "never expire" costs money

AWS bills log storage per GB of compressed data. Its pricing page uses a compression ratio of 0.15, so 100 GB of logs would take about 15 GB of storage. Your logs may compress differently. With that ratio, a service that writes 100 GB of logs a month costs:

100 GB of logs a monthStoredPer month
Ingestion, Standard class (every month)$50.00
Storage, 30-day retentionabout 15 GB$0.45
Storage, never expire, after 12 months180 GB$5.40
Storage, never expire, after 3 years540 GB$16.20

Without retention, storage cost climbs by $0.45 a month, every month, until someone sets a limit. Retention is a quick fix that stops that. But in this example, ingestion is still $50 a month. Writing less, or writing it to the Infrequent Access class, is what moves that number.

Check it yourself

1. What you pay: Billing and Cost Management → Cost Explorer, filtered to CloudWatch and grouped by Usage type. Usage types containing DataProcessing-Bytes are Standard ingestion, DataProcessingIA-Bytes Infrequent Access ingestion, VendedLog-Bytes vended logs, and TimedStorage-ByteHrs storage.

2. Log groups with no retention setting (repeat for each region):

aws logs describe-log-groups --region us-east-1 \
  --query 'logGroups[?!retentionInDays].[logGroupName,storedBytes]' --output table

In the console: CloudWatch → Logs → Log groups. The Retention column shows Never expire for these.

3. Which log groups ingest the most. The IncomingBytes metric in the AWS/Logs namespace is the uncompressed volume uploaded to each log group:

aws cloudwatch get-metric-statistics --region us-east-1 --namespace AWS/Logs \
  --metric-name IncomingBytes --dimensions Name=LogGroupName,Value=/aws/lambda/my-function \
  --start-time 2026-09-19T00:00:00Z --end-time 2026-10-03T00:00:00Z \
  --period 86400 --statistics Sum --output table

How to set retention

  1. Decide how long you need each log group. If anything must be kept for compliance, export it to Amazon S3 first.
  2. Console: CloudWatch → Logs → Log groups. In the Retention column, choose the current setting, such as Never expire. Under Expire events after, choose a value, then Save.
  3. CLI (this one changes your account):
    aws logs put-retention-policy --region us-east-1 \
      --log-group-name /aws/lambda/my-function --retention-in-days 30
    The allowed values are 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288 and 3653 days.
  4. Expect a short lag. CloudWatch Logs doesn't delete expired events immediately. It typically takes up to 72 hours.
  5. For new log groups that are rarely read, consider the Infrequent Access class. It halves ingestion to $0.25 per GB but leaves out some features, such as Live Tail, anomaly detection and subscription filters. A log group's class can't be changed after it's created.

The free checkup finds this and 20 other kinds of issues automatically. In each region it scans, it finds every log group of 1 GB or more with no retention setting and lists the 20 biggest, then a count of the rest. It estimates the saving at $0.03 per GB-month on 70% of the stored size the log group reports, assuming a 30 to 90 day retention removes about that much. It also reads last month's CloudWatch Logs ingestion cost from Cost Explorer, and adds a note when that's over $50. It reads log group settings and sizes only, never log contents, and it doesn't change any settings.

Run a free checkup

Sources

Prices are AWS list prices for US East (N. Virginia), checked October 3, 2026. Other regions differ.