Interview Prep/Monitoring & Observability/Observability as Code, Security & Vendor Choices

How do you keep a CloudWatch bill under control?

AdvancedProductionObservability as Code, Security & Vendor Choices
Answer

The usual top items are log ingestion, custom metrics and API calls.

  • Logs: set retention on every log group (default is "never expire"), use the Infrequent Access log class for logs you rarely query, drop debug logs at the source, and avoid sending VPC Flow Logs for every ENI at full detail.
  • Custom metrics: each name plus dimension combination is billed separately, so never put pod names or request IDs in dimensions. Use Embedded Metric Format (EMF) to emit metrics from logs only for the aggregates you need.
  • API calls: third-party tools polling GetMetricData every minute cost real money; use metric streams (Firehose) or lengthen polling intervals.
  • Logs Insights: priced per GB scanned, so narrow the time range and log groups.

Cost Explorer filtered by usage type (DataProcessing-Bytes, MetricMonitorUsage) shows which lever matters.

All Monitoring & Observability questions

More on Observability as Code, Security & Vendor Choices