CloudWatch Logs costs more than the EC2 fleet. What do you do?
IntermediateScenarioCost
Answer
Situation read → Logs ingestion is charged per GB ingested, and most of the bill is usually debug logs and a few chatty services.
What I'd do →
- Find the biggest log groups by
IncomingBytesin CloudWatch metrics. - Drop log levels to INFO in prod and remove noisy logs (health checks, per-request debug).
- Set retention on every log group; the default is "never expire".
aws logs put-retention-policy --log-group-name /eks/prod/app --retention-in-days 30
- Use the Infrequent Access log class for logs you rarely query.
- For high-volume app logs, ship to S3 (via Firehose) or a cheaper backend like Loki, and keep CloudWatch for AWS service logs and alerts.
- Add a Config rule or a CI check so new log groups must have retention.
Why → Ingestion is the cost driver, so reducing what you send beats reducing what you keep.
Interview tip → "Never expire is the default" is a detail interviewers like to hear.
More on Cost
The AWS bill jumped 40% this month and finance wants an explanation by tomorrow. How do you find out why?BeginnerThe "NAT Gateway – data processed" line is $9,000 a month. How do you bring it down?IntermediateCut EKS compute cost by 40% without hurting reliability. What's your plan?AdvancedDev and test environments run 24/7 but are used only during office hours. How do you cut that cost?BeginnerFinance asks you to buy commitments. Savings Plans or Reserved Instances, and how much?IntermediateYou want to run production workloads on Spot. How do you do it safely?Advanced