Search code examples
amazon-web-servicesamazon-ec2scheduled-tasksaws-auto-scaling

Can I make a scheduled auto-scaling policy in AWS to have 1 EC2 instance during specific hours?


I need to practice AWS for my job but I would like to reduce my personal costs as much as possible. I will only be working on my personal EC2 instance from noon to 11:00pm generally for the most part. Can I have an autoscaling group that will bring up the instance at noon and bring it down at 11:00pm? Saving me 13 hours of uptime a day, would this save on costs if it is possible? I know about scheduled scaling options but I do not know if there is a configuration for 0 instances during down times. Desired 0? Minimum 0? Max 1? Unsure


Solution

  • You can use scheduled scaling and define actions for start and stop at specific hours. For example:

    Start:

    Recurrence: 0 8 * * *

    Desired capacity: 1

    Stop:

    Recurrence: 0 11 * * *

    Desired capacity: 0

    Scheduled actions sample