All cheat sheets
Computecheat sheet

EC2 Instance Scheduling

Turn non-production instances off when nobody's using them. Dev/test/demo boxes needed ~50 of 168 hours a week are a ~70% overspend running 24/7 — ten m5.large go from $700 to about $208/month. AWS Instance Scheduler automates it with a tag.

Last reviewed: July 14, 2026

TL;DR: The simplest, highest-ROI AWS optimization is turning things off when you're not using them — yet a shocking number of teams run dev/test environments 24/7 while developers only touch them during business hours. An instance needed ~50 of 168 hours a week is a ~70% overspend running around the clock. AWS Instance Scheduler (free, since 2016) automates start/stop with a single tag; implement it once and save every month, forever.

The numbers

  • ~70% cut for a weekday-business-hours schedule (≈50 active of 168 hours).
  • Worked example: ten m5.large at $0.096/hr → $700.80/mo running 24/7 vs ~$208/mo on office hours — $492/mo ($6,000/yr) saved, zero architecture change.
  • Demo/training environments used a few hours a week can save 90%+.
  • AWS Instance Scheduler deploys via CloudFormation (Lambda + DynamoDB + CloudWatch Events); you define periods/schedules and tag instances with the schedule name.

Do this

  1. Deploy AWS Instance Scheduler and tag instances with a schedule (e.g. start 8:30 AM, stop 6:30 PM, weekdays), defaulting non-prod to "off":
    aws ec2 create-tags --resources i-0123abcd --tags Key=Schedule,Value=office-hours
    
  2. Target the right environments — dev/test/demo/training/sandbox are the sweet spot; leave true 24/7 production alone, and schedule staging only if it isn't mirroring prod.
  3. Handle global teams with region-specific schedules (NYC boxes on ET hours, London on GMT) or an extended shared window (still ~58% off at 1 AM–11 PM ET) — "global team" doesn't mean "always on."
  4. Add override periods for release weeks or on-call needs, and give developers a manual "wake up" path for the rare off-hours case.
  5. Don't forget databases — RDS uses its own stop/start feature, separate from EC2 scheduling.

Gotchas

  • Instance-store (ephemeral) volumes lose data on stop — use EBS for anything you need to persist.
  • Unattached Elastic IPs still bill when the instance is stopped — release them or front with a load balancer (see Unassociated Elastic IPs).
  • Startup must be clean — instances relying on manual startup scripts need the schedule tested end-to-end before you trust it.
  • Manual stopping won't stick — someone always forgets; the savings only compound when it's automated.

Skip this if

  • The workload genuinely serves traffic 24/7 — there's no idle window; commit the baseline with Compute Savings Plans or Reserved Instances instead.
  • The instance has expensive warm-up (large in-memory models/caches) and you need fast resume with state intact — EC2 Hibernation preserves RAM across the pause. For virtual desktops, WorkSpaces AutoStop is the equivalent lever.

Run this audit with your AI assistant

Paste this into Claude, ChatGPT, or any agent that can run the AWS CLI with read-only credentials. It audits your account for exactly the waste this sheet describes — and changes nothing.

You are auditing an AWS account for EC2 off-hours scheduling savings. Use
the AWS CLI with READ-ONLY credentials. Do not create, modify, or delete
anything — report findings and recommended (unapplied) fixes only.

1. Non-prod inventory: aws ec2 describe-instances — group by tags
   (Environment=Dev/Test/Staging/Demo), instance type, and $/hr. Flag
   always-on non-production instances (and any AWS Instance Scheduler
   Schedule tag already present).
2. Idle windows: pull CloudWatch CPUUtilization / network hourly over
   14-30 days; confirm predictable nights/weekends idle. A weekday-9-5
   box runs ~50 of 168 hrs (~70% cut).
3. Savings math: 24/7 = $/hr × 730 vs scheduled = $/hr × active hrs/wk ×
   4.33. Example: 10 m5.large @ $0.096 = $700.80/mo -> ~$208/mo scheduled.
4. Gotchas to flag: instance-store data lost on stop; unattached EIP
   charges; startup dependencies that need manual intervention; RDS uses
   a separate stop/start feature.

Report a table: instance | env | $/hr | idle window | est. $/mo saved |
blockers. Recommend AWS Instance Scheduler with Schedule tags. Change
nothing.
Works with any assistant that can run shell commands.

Want the guided version?

The EC2 Instance Scheduling walkthrough covers this topic interactively — it asks about your setup, branches to what’s relevant, and quizzes you on the tricky parts. Free and anonymous.

Start the walkthrough