All Scenarios
easySAASAPSOACost

Cost-Optimize Dev/Test Environments

An engineering team has 15 dev environments running 24/7, costing $4K/month. They're only actively used during business hours (9-5, Mon-Fri). Cut the cost without losing data.

Key Constraints

Dev envs only used 9-5 Mon-Fri (~24% of week)
Must be quick to start up (under 5 min)
Data must persist between stops
No impact on prod — opt-in via tag

Reference Architecture (interactive 3D)

🖱️ Drag to rotate · 📜 Scroll to zoom

Loading diagram...

Scheduled Start/Stop + Right-Sizing

  1. 1EventBridge cron: 7 PM weekdays → trigger Lambda to STOP all EC2/RDS tagged `Env=dev`.
  2. 2EventBridge cron: 8 AM weekdays → START them again.
  3. 3Lambda only acts on resources with the `Env=dev` tag (prevents accidentally stopping prod).
  4. 4EBS volumes persist while EC2 is stopped — no data loss, but EBS cost still applies.
  5. 5RDS automatic backups provide recovery if anyone tampers.
  6. 6Expected saving: ~70% of compute cost (40 of 168 hours running).
  7. 7Convert stateless services to Fargate Spot for additional 70% savings on those.
  8. 8AWS Budgets + SNS alert if monthly spend spikes — guards against scheduler bugs.

Common Traps (Wrong Answers)

  • RDS stop has a 7-day auto-restart limit — forgetting to restart it weekly causes failures
  • Not tagging resources (scheduler hits prod or misses dev)
  • Reserved Instances for dev (commits to 24/7 cost; defeats the purpose)
  • Using NAT Gateway in dev VPCs ($32/month each, unused at night) — use VPC endpoints

Try the simulator

Build this architecture yourself in the drag-and-drop simulator.