Using Resource Scheduler to stop and start EC2 instances

awsBy scheduling your EC2 instances to stop and start only when you need them, you can save significantly on your monthly bill.


Quick Setup

Start by logging on to your AWS console, with an admin account.

  1. Browse to https://console.aws.amazon.com.
  2. Go to Systems Manager, and click Quick Setup.
  3. In the Resource Scheduler section, click the Create button.
    1. Instance Tag: Enter a key and a value (e.g. Schedule, WorkingHours).
    2. Select a Time Zone.
    3. Choose the days that you want the schedule to run.
    4. Enter Start instance time (e.g. 9am)
    5. Enter Stop instance time (e.g. 5pm)
    6. Choose Current Region, to apply this schedule to your current region only, alternatively you can select multiple regions.
    7. Read the Summary to confirm your settings.
  4. Click Create button.

 

Tagging instances

For this schedule to be applied to specific instances you will need to tag them.

  1. Go to Services > EC2.
  2. Select the Instance, by clicking its checkbox.
  3. Select the Tags tab.
  4. Click the Manage tags button.
  5. Add a new Tag with a Key and a Value to match your schedule (e.g. Schedule, WorkingHours).

You should find that your instance will start and stop according to the schedule that you've set. You can still manually start and stop the instance outside the schedule times, but if the instance is running it will automatically stop at the stop time, and if it isn't running, it will automatically start at the start time.

 

Thanks for visiting,
Steven