TLDR
AWS Instance Scheduler is a free and open-source service that enables users to schedule the start and stop times of their AWS resources, reducing costs by avoiding idle resources. It can be used with EC2, RDS, and Redshift instances, and is flexible enough to accommodate different schedules and criteria for various instances. Its audit logging capabilities allow users to track instance usage, making it easy to troubleshoot and manage their AWS costs.
Introduction
Are you tired of paying for idle resources on AWS? Do you want to optimize your infrastructure usage and reduce your EC2 costs? If so, you should consider using AWS Instance Scheduler.
Instance Scheduler is a free and open-source service that allows you to schedule the start and stop times for your Amazon Elastic Compute Cloud (EC2) instances. By scheduling your instances to run only when needed, you can significantly reduce your EC2 costs while still maintaining flexibility and agility.
What can I use instance scheduler for?
Instance Scheduler can be used with several AWS services, including EC2, RDS, and Redshift. This means that you can schedule not only your compute instances but also your database and analytics instances, further reducing your AWS costs.
The best part? Instance Scheduler is completely free to use. You can deploy it on your own AWS account, and it supports scheduling for both On-Demand and Spot instances. It can also be integrated with AWS Systems Manager to enable automation and centralized management.
How does it work?
Instance Scheduler provides a flexible scheduling interface that allows you to specify start and stop times for your instances on a daily or weekly basis. You can create multiple schedules and assign them to different groups of instances based on tags or other criteria. This makes it easy to manage large fleets of instances with different requirements.
Instance Scheduler also supports tag-based scheduling, which allows you to apply scheduling rules to groups of instances based on their tags. This makes it easy to manage instances for different environments, such as development, staging, or production.
Use cases
For example, you can schedule your development instances to run during business hours and your staging instances to run only during testing periods. You can also schedule your production instances to run only during peak business hours, and stop them during off-hours when no business activity is taking place.
Instance Scheduler provides detailed audit logging capabilities that allow you to track when instances were started and stopped, who initiated the action, and any errors that occurred. This makes it easy to troubleshoot any issues and ensure that your instances are running according to your schedule.
How to setup AWS instance scheduler?
Setting up AWS Instance Scheduler using a CloudFormation template stack is a quick and easy way to get started with the scheduler. Here are the steps to follow:
- Download the Instance Scheduler CloudFormation template: The Instance Scheduler template is available on the AWS Quick Start GitHub repository. Download the template to your local machine.
- Upload the template to AWS CloudFormation: In the AWS Management Console, navigate to the CloudFormation service and click on "Create Stack". Select the Instance Scheduler CloudFormation template and upload it to CloudFormation.
- Set up the stack: Follow the prompts to set up the stack. You will need to provide a stack name, specify the IAM roles for Instance Scheduler, and configure the desired schedules and tags for your instances.
- Launch the stack: Once you have configured the stack, click "Create Stack" to launch the Instance Scheduler solution.
- Verify Instance Scheduler: After the stack has been launched, you can verify that Instance Scheduler is working correctly by checking the Instance Scheduler logs and verifying that your instances are starting and stopping according to the specified schedules.
Update the stack: If you need to update the Instance Scheduler stack, you can do so by making changes to the CloudFormation template and updating the stack. The changes will be applied automatically to your instances.
Overall, setting up Instance Scheduler using a CloudFormation template stack is a quick and easy way to get started with the scheduler. With Instance Scheduler, you can reduce your AWS costs and improve your infrastructure usage by scheduling your instances to run only when needed, and stopping them when they are not.
If you prefer to follow a video tutorial check out the following
Conclusion
In conclusion, AWS Instance Scheduler is a powerful tool for managing your AWS costs and optimizing your infrastructure usage. By scheduling your instances to run only when needed, you can reduce your EC2 costs while still maintaining flexibility and agility. Best of all, it's completely free to use! So why not give it a try and see how much you can save?