AWS Cost Explorer and Budget Alert Setup
The AWS bill arrives at the end of the month — by then the engineer who spun up a GPU cluster for a "quick test" has already forgotten about it three weeks ago. The NAT Gateway that no one deleted after project closure continues to incur charges — each idle NAT Gateway costs $32.40/month ($0.045/hour * 24 * 30). A forgotten EBS snapshot costing $400/month remains unnoticed because it's "only" 2% of the total bill. Budget alerts and Cost Explorer are not just a financial tool — they are operational hygiene, and we help clients implement it in one day.
Enabling Cost Allocation Tags
Before the AWS cost analysis tool shows anything useful beyond aggregate numbers, you need cost allocation tags. Tags are activated in Billing → Cost allocation tags → User-defined. After activation, data appears with up to 24 hours delay; retroactive data is not populated.
Minimum set of tags: Environment (production/staging/dev), Service (e.g., payments, auth), Team, CostCenter. When creating resources via Terraform, we use default_tags in the provider block to automatically assign tags:
provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Environment = var.environment
Service = var.service_name
ManagedBy = "terraform"
}
}
}Resources without tags appear as No tag: Service. The AWS Config Rule REQUIRED_TAGS automatically marks non-compliant resources as non-compliant.
AWS Budgets: Types and Proper Setup
- Cost Budget — alerts when actual or forecasted costs exceed thresholds. We create one for each account and key services.
- Usage Budget — alerts on usage units: number of t3.xlarge instances, S3 storage volume, Lambda invocations.
- Savings Plans Coverage Budget — signals if Savings Plans cover less than X% of compute costs.
- Anomaly Detection Budget — an ML model builds a baseline and triggers on statistical anomalies.
Configuration rules:
- Actual 80% — warning in Slack to engineers.
- Actual 100% — alert in Slack + email to team lead.
- Forecasted 100% — forecast that budget will be exhausted by month end.
For automation, we use SNS + Lambda: on budget exceedance, Lambda can apply a Service Control Policy (SCP) that restricts creating new resources in a sandbox account.
How Cost Explorer Helps Find Hidden Costs?
First glance — breakdown by services: EC2, RDS, S3, Data Transfer. Data Transfer is often unexpectedly large — inter-AZ traffic within a region costs $0.01/GB and adds up at high RPS.
EC2 Cost Breakdown by instance type helps find oversized instances. An r5.8xlarge at $1.5/hour running 24/7 in staging is a typical find. By automating scheduling, we saved a client $5,000 per month in staging compute costs. Rule: staging runs only during working hours via Instance Scheduler.
Hourly and resource-level granularity are enabled separately and show costs per individual EC2 and RDS — you can pinpoint the top spender.
Common hidden costs:
| Item | Why not obvious |
|---|---|
| NAT Gateway | $0.045/GB + $0.045/hour, accumulates unnoticed; each idle gateway costs $32.40/month |
| EBS Snapshots | Not visible in EC2 bill separately without filter; a 1TB snapshot costs ~$100/month |
| CloudWatch Logs | Ingestion + Storage, expensive with verbose logging; can reach hundreds per month |
| Data Transfer out | Every GB out costs money; typical ~$0.09/GB for large volumes |
| Idle ELB | ALB with no traffic: $0.008/hour = $5.8/month each; stays unnoticed if many are deployed |
Savings Plans and Reserved Instances
For stable workloads, discount commitment plans (Savings Plans) offer 20-66% discount in exchange for a commitment ($X/hour for 1 or 3 years). Compute Savings Plans are 3x more flexible than EC2 Instance Savings Plans, though they offer up to 22% less discount.
Comparison of types:
| Parameter | Compute Savings Plans | EC2 Instance Savings Plans |
|---|---|---|
| Flexibility | Any EC2, Lambda, Fargate | Single instance family + region |
| Discount | 20-66% | up to 72% |
| Applicability | High | Low (if stack changes) |
Cost Explorer → Savings Plans → Recommendations shows recommended commitment based on historical usage over 7/30/60 days. We recommend buying 70-80% of baseline load — peaks are covered by On-Demand. Rightsizing Recommendations analyzes CPU/Memory utilization of EC2 over 14 days. An instance with <5% avg CPU is a candidate for downsizing. Before downsizing, check peak utilization, not just average.
Automating Cost Control
AWS Instance Scheduler — a serverless template to stop/start EC2 and RDS on a schedule. Automated anomaly detection via AWS Budgets is 10 times faster than manual cost review. Staging stops at 19:00, starts at 08:00. Savings: ~65% compute costs for non-production environments. We helped a client save $12,000 per month by rightsizing RDS instances using AWS Compute Optimizer recommendations.
S3 Intelligent-Tiering for objects with unpredictable access patterns — automatically moves between Standard, IA, and Archive. Monitoring fee of $0.0025/1000 objects pays off when average object age exceeds 30 days.
Trusted Advisor (Business support) finds idle EC2, unused EIPs, underutilized RDS — we run a review quarterly.
How to Perform Rightsizing: Step-by-Step
1. Open Cost Explorer → Rightsizing Recommendations. 2. Filter by account and region. 3. Select instances with Downsize recommendation. 4. Check peak utilization over 7 days. 5. Change instance type via AWS Console or Terraform.According to AWS Savings Plans documentation, Compute Savings Plans provide up to 66% discount on compute usage. The AWS Budgets documentation notes that budgets enable custom tracking and quick response via Budgets Actions.
What's Included in the Setup
We configure the entire cost control cycle:
- Audit of current tags and activation of cost allocation tags.
- Creation of budgets for each account and key services.
- Configuration of alerts in Slack, email, and Telegram.
- Set up the cost management tool with resource-level granularity.
- Recommendations for discount plans and resource optimization.
- Automate stop of unused resources via Instance Scheduler.
- Documentation of the process and team training.
With over 5 years on the market and 10+ years of DevOps experience, we have successfully completed more than 50 cloud infrastructure optimization projects, consistently reducing AWS bills by 30-50% for our clients. Contact us to request an audit of your current AWS costs and take control of your cloud spending.
The AWS Compute Optimizer service recommends optimal resources for workloads to reduce costs and improve performance.
Setup time — from 1 business day for a basic configuration. Cost is calculated individually based on infrastructure volume.







