API Gateway Access Log Cost Calculator (CloudWatch Logs)

Estimate API Gateway access log cost by converting requests/month x bytes/log into GB/day, then pricing ingestion and retention. Compare baseline vs peak volume.

Inputs

Requests (per month)
Avg 19.04 req/sec.
Avg RPS
Use baseline API traffic.
Est 105,062,400 requests/month.
Avg log bytes per request
Retention (days)
Ingest price ($ / GB)
Storage price ($ / GB-month)
Use your actual log format size. If unsure, sample 100-1,000 log lines and compute average bytes.
Scenario presets

Results

Estimated ingestion volume
2.47 GB/day
Estimated monthly total
$39.72
Ingest cost
$37.50
Storage cost
$2.22

How to estimate bytes per log line (quick, reliable)

  1. Export 100-1,000 log lines from a representative day.
  2. Compute average bytes/line (and p95 if you want a peak scenario).
  3. Re-check after changing log format: adding headers, user agents, and long paths can materially increase bytes per request.

High-leverage fixes for access log costs

  • Log only the fields you use (drop large headers and rarely-used fields).
  • Sample noisy endpoints (health checks, bots) instead of logging every request.
  • Shorten retention for high-volume access logs and archive cold data if required.

How to get your inputs

  • Volume: start from measured ingestion (GB/day) if you have it, then convert to monthly/retention where needed.
  • Retention: decide retention days and model steady-state GB-month.
  • Queries: model scan/query volume if your tool bills by GB scanned.

Result interpretation

  • Requests and bytes/log drive ingestion; retention multiplies storage.
  • If ingestion dominates, cut log size or sampling before changing retention.

Common mistakes

  • Modeling ingestion but forgetting retention (GB-month) and scan/query costs.
  • Keeping noisy logs forever instead of setting explicit retention tiers.

Scenario planning

Scenario Requests Bytes/log Retention
Baseline Expected Typical Standard
Peak High Same Same

Validate after changes

  • Check ingestion GB/day and retention GB-month after changes.
  • Check query scan GB and dashboard refresh frequency (common hidden driver).

Next steps

Advertisement

Example scenario

  • 50M requests/month with 1.5 KB average access log line -> estimate GB/day and monthly ingestion + retention cost.
  • Peak 220% scenario captures launch or incident spikes in request volume.

Included

  • Estimated ingestion volume (GB/day) from request volume and average log bytes.
  • Optional RPS-based request estimator.
  • Ingestion and retention storage cost estimate from your pricing inputs.
  • Baseline vs peak scenario table for request spikes.

Not included

  • API Gateway request pricing and response transfer pricing.
  • Logs Insights query scan/search costs (model separately if needed).

How we calculate

  • GB/day ~ (requests/month / 30.4) x bytes/log / 1e9.
  • Monthly ingestion cost ~ (GB/day x 30.4) x $/GB.
  • Retention storage cost uses a steady-state GB-month model for the retention window.

FAQ

How do I estimate average log bytes per request?
Sample your access log output (100-1,000 lines) and compute average bytes per line. Log format fields and headers can change size materially.
Does this include API Gateway request charges?
No. Use an API Gateway cost calculator for request and transfer charges. This focuses only on access logs stored in a logging system.
What levers reduce access log cost?
Reduce log verbosity/fields, sample logs for high-volume endpoints, and shorten retention for noisy logs.

Related tools

Related guides

Advertisement

Disclaimer

Educational use only. Not legal, financial, or professional advice. Results are estimates based on the inputs and assumptions shown on this page. Verify pricing and limits with your providers and documentation.

Last updated: 2026-01-29