Dev and test environments run 24/7 but are used only during office hours. How do you cut that cost?
BeginnerScenarioCost
Answer
Situation read → Office hours are about 50 of the 168 hours in a week. Non-prod running all the time pays for the other ~70%.
What I'd do →
- Schedule scale-down: EKS node groups or Karpenter limits to zero at night, ASGs with scheduled actions, RDS stopped (max 7 days before auto-start, so re-stop it).
aws autoscaling put-scheduled-update-group-action --auto-scaling-group-name dev-app \
--scheduled-action-name night-off --recurrence "30 14 * * 1-5" \
--min-size 0 --max-size 0 --desired-capacity 0
(Recurrence is UTC: 14:30 UTC is 20:00 IST.)
2. Kubernetes workloads: tools like kube-downscaler scale Deployments to zero by annotation.
3. Tag everything with env and owner so the scheduler and reports know what to touch.
4. Give a self-service "wake up" button (a pipeline or Slack command) for late work.
Why → It's the easiest saving with almost no engineering risk.
Interview tip → Mention the RDS 7-day auto-start; it shows you've actually run this.
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?AdvancedCloudWatch Logs costs more than the EC2 fleet. What do you do?IntermediateFinance 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