Use this skill when you need to estimate costs, optimize spend, or define scaling strategies. Covers estimation by tier, Reserved Instances, Savings Plans, auto-scaling, AWS Budgets, and spend alerts. Budget is a cross-cutting design constraint.
Budget is not a suggestion — it is a design constraint. Every architectural decision goes through the cost filter.
Ideal for: MVP, hobby, side project, prototype
Typical stack:
├── Frontend: Vercel Hobby (free)
├── Backend: Lambda free tier (1M req/month)
├── DB: Neon free tier or Supabase free or DynamoDB free tier
├── Storage: S3 (5 GB free tier)
├── CDN: CloudFront (1 TB free tier)
├── Cache: Upstash Redis free tier
├── Monitoring: CloudWatch (included) + Sentry free
└── CI/CD: GitHub Actions (2,000 min/month free)
Total cost: $0–$20/month
Limitations:
- No custom domain with SSL on some free tiers
- Limited throughput
- No HA (single AZ, no failover)
- No support
Ideal for: Early stage startup, app with first users
Typical stack:
├── Frontend: Vercel Pro ($20/dev/month) = $20–60
├── Backend: Lambda (beyond free tier) = $5–20
├── DB: Neon Pro ($19) or RDS t4g.micro ($13) = $13–25
├── Storage: S3 (< 50 GB) = $2–5
├── CDN: CloudFront (< 100 GB transfer) = $5–10
├── Cache: Upstash Pro ($10) if needed = $0–10
├── Monitoring: CloudWatch + Sentry Team ($26) = $26–30
├── CI/CD: GitHub Actions (free or Team $4/user) = $0–20
└── DNS: Route53 ($0.50/zone + queries) = $1–3
Total cost: $70–180/month
Benefits vs Minimal:
+ Custom domains
+ More throughput
+ Automatic DB backups
+ Professional error tracking
Ideal for: Startup with traction, SaaS with paying customers
Typical stack:
├── Frontend: Vercel Pro ($20/dev × 3) = $60
├── Backend: Lambda or ECS Fargate (1-2 tasks) = $50–100
├── DB: RDS t4g.small Multi-AZ ($52) = $52–105
├── Cache: ElastiCache t4g.micro ($12) = $12–24
├── Storage: S3 (100–500 GB) + CloudFront = $20–60
├── Networking: NAT Gateway (if VPC) = $32
├── Monitoring: CloudWatch + Sentry Pro + X-Ray = $50–100
├── Security: WAF ($6 + rules) = $10–30
├── CI/CD: GitHub Team + Actions = $20–40
└── DNS + Certificates = $5
Total cost: $300–600/month
Benefits vs Low:
+ High availability (Multi-AZ)
+ Cache for performance
+ WAF for security
+ Distributed tracing
Ideal for: Established company, SaaS with real scale
Typical stack:
├── Frontend: Vercel Pro ($20/dev × 5-10) = $100–200
├── Backend: ECS Fargate (2-4 tasks auto-scaling) = $150–400
├── DB: RDS r6g.large Multi-AZ + Read Replica = $350–500
├── Cache: ElastiCache t4g.small cluster = $50–100
├── Storage: S3 (1 TB+) + global CloudFront = $50–150
├── Search: OpenSearch (if needed) = $100–300
├── Messaging: SQS + EventBridge = $10–30
├── Networking: NAT Gateway × 2 AZ = $64
├── Monitoring: Datadog ($15/host × N) = $100–300
├── Security: WAF + Shield = $30–50
└── CI/CD: GitHub Enterprise + Actions = $50–100
Total cost: $1,500–$3,000/month
Lambda + API Gateway + DynamoDB + S3
Benefit: you ONLY pay for what you use.
If you have 0 requests at 3 AM → you pay $0.
Decision threshold:
- < 3M requests/month → Lambda is cheaper than Fargate
- > 3M requests/month → evaluate Fargate (can be more efficient)
- Constant high traffic → Fargate with Savings Plans
For CONSTANT workloads that won't change in 1-3 years:
RDS Reserved Instances:
- 1 year, no upfront: ~30% savings
- 1 year, all upfront: ~40% savings
- 3 years, all upfront: ~60% savings
Compute Savings Plans:
- Covers: Lambda, Fargate, EC2
- 1 year: ~30% savings
- 3 years: ~50% savings
When to buy:
✅ After 3+ months of stable usage (real consumption data)
❌ NEVER at the start — first understand your usage patterns
❌ NEVER for workloads that might disappear
Rule: review sizing every 3 months.
DB:
- Average CPU < 20% → downgrade tier
- Average CPU > 70% → upgrade tier
- Free memory > 50% → possibly over-provisioned
ECS Tasks:
- CPU utilization < 30% average → reduce vCPU/Memory
- Use Fargate Spot for non-critical tasks (70% savings)
Lambda:
- Use Power Tuning to find the memory sweet spot
(more memory = more CPU = faster execution = can be cheaper)
- AWS Lambda Power Tuning: official tool for this
Configure lifecycle policies on S3 (reference: storage-and-cdn skill): Standard → Standard-IA at 30–90 days. Standard-IA → Glacier at 365 days. Delete temporary files automatically. Potential savings: 40–90% on old files.
NAT Gateway = $32/month + $0.045/GB processed
It's one of the sneakiest expenses in AWS.
Options to reduce:
1. Single NAT Gateway (instead of one per AZ): $32 vs $64
Risk: if the NAT's AZ goes down, private subnets lose internet
2. VPC Endpoints for S3/DynamoDB: traffic doesn't go through NAT ($0)
3. NAT Instance: EC2 t4g.nano (~$3/month) — but you manage it
4. No VPC: if you can avoid it (Lambda + DynamoDB without VPC)
Native auto-scaling — scales from 0 to 1,000 concurrent automatically without any configuration.
When to enable Provisioned Concurrency: only for time-sensitive APIs where cold starts are unacceptable. For everything else, a 200ms cold start is acceptable.
# Terraform — ECS Auto-scaling
resource "aws_appautoscaling_target" "ecs" {
max_capacity = 10
min_capacity = 2 # Minimum 2 for HA
resource_id = "service/${aws_ecs_cluster.main.name}/${aws_ecs_service.api.name}"
scalable_dimension = "ecs:service:DesiredCount"
service_namespace = "ecs"
}
resource "aws_appautoscaling_policy" "cpu" {
name = "cpu-scaling"
policy_type = "TargetTrackingScaling"
resource_id = aws_appautoscaling_target.ecs.resource_id
scalable_dimension = aws_appautoscaling_target.ecs.scalable_dimension
service_namespace = aws_appautoscaling_target.ecs.service_namespace
target_tracking_scaling_policy_configuration {
target_value = 70 # Scale when CPU > 70%
scale_in_cooldown = 300
scale_out_cooldown = 60
predefined_metric_specification {
predefined_metric_type = "ECSServiceAverageCPUUtilization"
}
}
}
Storage auto-scaling: configure max_allocated_storage — expands automatically when storage > 90%.
Read Replicas to scale reads: use when there is a read-heavy workload (analytics, searches). App routes read queries to replica. Cost: same as the primary instance.
# Terraform — Budget with alerts
resource "aws_budgets_budget" "monthly" {
name = "monthly-budget"
budget_type = "COST"
limit_amount = "300" # $300/month
limit_unit = "USD"
time_unit = "MONTHLY"
notification {
comparison_operator = "GREATER_THAN"
threshold = 80 # Alert at 80% of budget
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = ["[email protected]"]
}
notification {
comparison_operator = "GREATER_THAN"
threshold = 100 # Alert at 100% of budget
threshold_type = "PERCENTAGE"
notification_type = "ACTUAL"
subscriber_email_addresses = ["[email protected]"]
}
notification {
comparison_operator = "GREATER_THAN"
threshold = 100 # Alert if FORECAST exceeds budget
threshold_type = "PERCENTAGE"
notification_type = "FORECASTED"
subscriber_email_addresses = ["[email protected]"]
}
}
The agent recommends IaC based on the team and project:
Team's IaC experience?
│
├── None + serverless project
│ ├── SST (Serverless Stack) → Superior developer experience for
│ │ serverless on AWS. Native TypeScript. Live Lambda development.
│ └── Serverless Framework → More mature, more docs, more plugins
│
├── Basic/Intermediate + mixed project (serverless + containers + DB)
│ └── Terraform → Industry standard, multi-cloud ready
│ With official AWS modules (VPC, ECS, RDS...)
│ HCL is simpler than CloudFormation YAML
│
├── Advanced + TypeScript team
│ └── AWS CDK → Infrastructure as actual TypeScript code
│ Type-safe, composable constructs
│ Compiles to CloudFormation
│
└── They already have something
└── Keep what they have. Migrating IaC has a high cost.
RULE: the agent proposes the tool and justifies. Does not assume.
Phase 1 — MVP (0–100 users): Pure serverless (Lambda + DynamoDB/Neon + S3 + Vercel). $0–50/month. Focus on development speed.
Phase 2 — Product-Market Fit (100–1,000 users): Serverless with more services (Redis, SQS, Sentry). Consider RDS if you need SQL. $50–300/month. Focus on reliability and monitoring.
Phase 3 — Growth (1,000–10,000 users): Evaluate Fargate if Lambda hits limits. Multi-AZ for HA. Global CDN, aggressive caching. $300–1,500/month. Focus on performance and scalability.
Phase 4 — Scale (10,000+ users): Auto-scaling on everything. Read replicas, distributed cache. Possible microservices for key domains. Reserved Instances/Savings Plans. $1,500+/month. Focus on cost optimization and resilience.