Explanation
Non-production EC2 instances are often provisioned for daytime-only usage but remain running 24/7 out of convenience or oversight. This results in unnecessary compute charges, even if the workload is inactive for 16+ hours per day. AWS supports automated schedules to stop and start instances at predefined times, allowing organizations to retain data and instance configuration without paying for unused runtime. Implementing a shutdown schedule for inactive periods (e.g., nights, weekends) can reduce compute costs by up to 60% in typical non-prod environments.
Relevant Billing Model
EC2 is billed per second (Linux) or per hour (Windows, older instances) based on:
- Instance type and size
- Uptime duration
- Additional charges for associated resources (e.g., EBS volumes) continue even when the instance is stopped
Detection
- Identify EC2 instances in dev/test/staging environments using tags or naming conventions
- Analyze instance runtime patterns via CloudWatch metrics or billing data
- Highlight instances with predictable daily usage but continuous uptime
- Determine whether workloads require persistent availability outside working hours
Remediation
- Implement scheduled shutdowns using AWS Instance Scheduler or EventBridge rules
- Ensure stateful data is retained via attached EBS volumes or AMIs
- Set start/stop windows aligned to working hours (e.g., 8 a.m.-6 p.m. weekdays)
- Review and optimize schedules quarterly to match evolving team usage