Skip to content

How to schedule automatic instance start and stop (QuickSetup)

0

I am trying to reduce costs by stopping EC2 instances that are currently in operation during periods when they are not in use.

I am considering using Systems Manager's Quick Setup as a scheduling method to automatically start and stop instances, but I have a question.

It seems that with Quick Setup, you can set up settings to start and stop instances at specific times on specific days of the week. For example, you can set up a daily schedule to run only from 8:00 to 18:00 from Monday to Friday, and stop at other times, but I don't know how to set it up if I want to run it for multiple consecutive days.

As a specific example, I would like to set up a schedule to run continuously from 13:00 on Monday to 13:00 on Friday, and stop it from 13:00 on Friday to 13:00 on the following Monday, but I don't know how to do that.

How should I set up the above? Also, is such a setting even possible in the first place?

asked a year ago734 views
2 Answers
0
Accepted Answer

Hi, we understand you would like to reduce your cost by automatically starting and stopping EC2 instances during specific periods. There are few options which you can use.

There are few best practices which you can follow to make this process easier like Tag your instances for easy identification process, Error handling in your implementation, document emergency contact info for any error or issues, etc

You can reach out to AWS support for any need.

AWS
EXPERT
answered a year ago
  • Thank you for your reply. I have tried using EventBridge and SystemsManager automation documents. I have confirmed that this method can also implement the scheduling I described above, but it takes more work than using Quick Setup. However, does this mean that the scheduling I want is still not possible with Quick Setup? If so, I will consider using EventBridge. What do you think?

0

Using AWS Systems Manager's Quick Setup for scheduling automatic start and stop of EC2 instances is indeed a good way to reduce costs. However, the specific scenario you described - running continuously from Monday 13:00 to Friday 13:00 and stopping from Friday 13:00 to Monday 13:00 - is not directly supported by Quick Setup's basic scheduling options.

Quick Setup's scheduler is designed for simpler daily patterns, typically starting and stopping instances at the same times each day. It doesn't have built-in support for multi-day continuous runs or complex schedules spanning several days.

For your specific use case, you have a few options:

  1. Use AWS Instance Scheduler: This is a more flexible solution that can handle complex schedules. With Instance Scheduler, you can create custom periods and schedules that match your exact requirements, including multi-day runs.

  2. Use Amazon EventBridge (formerly CloudWatch Events): This service allows you to create more complex scheduling rules. You could set up separate rules for starting the instances on Monday at 13:00 and stopping them on Friday at 13:00.

  3. Combine Quick Setup with manual intervention: You could use Quick Setup to start the instances daily at 13:00 and then manually stop them on Fridays. However, this defeats the purpose of full automation.

  4. Break down your schedule: You could set up Quick Setup to run instances from 13:00 to 23:59 Monday to Thursday, and from 00:00 to 13:00 on Friday. This isn't exactly what you want, but it's the closest approximation possible with Quick Setup.

Given your specific requirements, the AWS Instance Scheduler or Amazon EventBridge would be more suitable solutions. They offer the flexibility to create the exact schedule you need, allowing for continuous multi-day runs and precise start/stop times across different days of the week.

Remember, whichever method you choose, always test your scheduling setup thoroughly to ensure it behaves as expected and doesn't inadvertently leave instances running when they should be stopped.
Sources
Stop and start EC2 instances automatically on a schedule using Quick Setup - AWS Systems Manager
Period reference - Instance Scheduler on AWS
start and stop EC2 windows server | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.