Why it matters
Log groups that keep data forever grow every month. Tiering lowers the cost of that history with no change to your logs or how you query them.How nOps finds it
nOps flags an account and region when all its CloudWatch Logs storage is billed at the Standard rate and its log groups that never expire hold data older than 30 days. The estimate bills data 30 to 90 days old 40% less and data older than 90 days 80% less, at your billed storage rate. It counts only log groups that never expire and assumes nobody reads that data, so it is a lower bound when old data stays unread.Before you start
Permission to set the storage tier policy (logs:PutStorageTierPolicy). A recent AWS CLI. Not available in me-south-1 and me-central-1.
How to implement
- Check the current setting (
aws logs get-storage-tier-policy --region REGION); it should show STANDARD. - Turn on Intelligent Tiering for the region (
aws logs put-storage-tier-policy --storage-tier INTELLIGENT_TIERING --region REGION). - Run it with credentials for each account and region where nOps shows the recommendation.
- After 30 days, check the bill for tiered storage usage and lower storage charges.
Risks and considerations
- The setting applies to every log group in the account and region.
- Reading old data, for example with Logs Insights, moves it back to the Standard rate for 30 days.
- Nothing is deleted. To roll back, set the storage tier back to STANDARD.
FAQs
Does it change how I query logs?
Does it change how I query logs?
No. Logs Insights, exports and Live Tail work the same. Only the storage price changes.
Should I also set a retention period?
Should I also set a retention period?
If you do not need the old data, yes. With tiering on, retention saves less, because old data already costs less. Do not add the two savings together.