Harness over 40 enterprise-class cloud services to drive business efficiency

 ✕

Homepage  »  Amazon Web Services Solutions  »  Amazon Web Services Instance Scheduler

Amazon Web Services Instance Scheduler

Configure start and stop schedules for your Amazon EC2 and Amazon RDS instances to manage costs

Homepage  »  Amazon Web Services Solutions  »  Amazon Web Services Instance Scheduler

Amazon Web Services Instance Scheduler

Configure start and stop schedules for your Amazon EC2 and Amazon RDS instances to manage costs

Overview

Instance Scheduler on Amazon Web Services automates the starting and stopping of various Amazon Web Services services, including Amazon Elastic Compute Cloud (Amazon EC2), Amazon EC2 Auto Scaling Groups, and Amazon Relational Database Service (Amazon RDS) instances. Automating this process helps reduce operational costs by stopping and starting resources as needed. This Amazon Web Services Solution uses resource tags and Amazon Lambda to automatically stop and start instances based on a schedule you define, and it can be deployed across multiple Amazon Web Services Regions.

When compared to a setup where you leave all your instances continuously running at full utilization (even when those resources aren't being used), this solution can lead to significant cost savings by aligning your workloads with the Amazon Web Services Well-Architected Cost Optimization best practices.

Benefits

Cross-account instance scheduling
This solution includes a template that creates the Amazon Identity and Access Management (IAM) roles necessary to start and stop instances in secondary accounts.
Cross-account instance scheduling
This solution includes a template that creates the Amazon Identity and Access Management (IAM) roles necessary to start and stop instances in secondary accounts.
Automated tagging
This solution can automatically add tags to all instances it starts or stops. The solution also includes macros that allow you to add variable information to the tags.
Automated tagging
This solution can automatically add tags to all instances it starts or stops. The solution also includes macros that allow you to add variable information to the tags.
Configure schedules or periods using Scheduler CLI
This solution includes a command line interface (CLI) that provides commands for configuring schedules and periods. The CLI allows customers to estimate cost savings for a given schedule.
Configure schedules or periods using Scheduler CLI
This solution includes a command line interface (CLI) that provides commands for configuring schedules and periods. The CLI allows customers to estimate cost savings for a given schedule.
Configure schedules or periods using Amazon Systems Manager maintenance window
For EC2 instances, this solution can use Systems Manager maintenance windows defined in the same Amazon Web Services Region as the instances and start and stop the instances for the maintenance window.
Configure schedules or periods using Amazon Systems Manager maintenance window
For EC2 instances, this solution can use Systems Manager maintenance windows defined in the same Amazon Web Services Region as the instances and start and stop the instances for the maintenance window.

Technical details

You can automatically deploy this architecture using the implementation guide and the accompanying Amazon CloudFormation templates, or get started with the resources below:

Amazon Web Services Instance Scheduler

Step 1
This Amazon Web Services Solution deploys an Amazon EventBridge rule with a configurable scheduling interval. This scheduling interval defines how frequently the solution runs and takes action to schedule your instances.

Step 2
Each scheduling interval invokes an Amazon Lambda orchestration function. This will determine the list of Amazon Web Services accounts, regions, and services that need to be scheduled. The orchestrator will then invoke multiple scheduling request Lambda functions in parallel to perform scheduling activities.

Step 3
A collection of schedules and periods are stored in an Amazon DynamoDB configuration table to control the scheduling behavior of this solution. You can configure any number of schedules or periods in this table, and the solution will schedule instances accordingly.

Step 4
Each scheduling request inspects resources in its particular target (account, region, service) to find resources that have been tagged for scheduling by using schedules defined in the solution’s configuration table. The scheduling request handler then inspects the configured schedules and performs the required scheduling actions.

Step 5
If auto scaling group (ASG) scheduling is enabled, Instance Scheduler on Amazon Web Services deploys an hourly EventBridge rule and associated resources to manage scheduled scaling actions for tagged Amazon EC2 Auto Scaling groups.

Step 6
In addition to the hourly scan, this solution also tracks updates to schedules in the configuration table. When a schedule is updated, a secondary orchestration Lambda function is invoked so that ASG scheduled scaling actions are kept up to date with the most recent schedule configuration.

Step 7
This solution provides multiple ways to create or update schedules in the solution’s configuration table, along with several example schedules to use as a starting point. Configuration methods include: the DynamoDB console, a scheduler command line interface (CLI), and an Amazon CloudFormation Custom resource.

Step 8
If Amazon Orgs Mode is enabled and a valid Organization ID is provided when the solution is deployed, Instance Scheduler on Amazon Web Services automatically registers newly deployed spoke stacks with the solution hub stack. The hub and spoke stacks must be deployed in the same Region and in accounts that are members of the same Amazon Web Services Organization.

Cost Optimization with Amazon Web Services
Build modern, scalable applications on Amazon Web Servicesto transform your organization, all while optimizing costs through Cost Optimization with Amazon Web Services. The variety of Amazon Web Services pricing options provides you with the flexibility to design your purchase plan to meet your specific workload needs.
Cost Optimization with Amazon Web Services
Build modern, scalable applications on Amazon Web Servicesto transform your organization, all while optimizing costs through Cost Optimization with Amazon Web Services. The variety of Amazon Web Services pricing options provides you with the flexibility to design your purchase plan to meet your specific workload needs.
Cost Optimization Pillar - Amazon Web Services Well Architected Labs

This repository contains documentation and code in the format of hands-on labs to help you learn, measure, and build cost optimized workloads using well-architected best practices.

You can learn more here.

Cost Optimization Pillar - Amazon Web Services Well Architected Labs

This repository contains documentation and code in the format of hands-on labs to help you learn, measure, and build cost optimized workloads using well-architected best practices.

You can learn more here.

Use cases for this Amazon Web Services Solution
Management & Governance
About this deployment
Version
3.0.4
Released
8/2024
Author
Amazon Web Services
Est. deployment time
5 mins
Source code  CloudFormation template  CloudFormation remote template 
Explore all Amazon Web Services Solutions

Browse our portfolio of Amazon Web Services-built solutions to common architectural problems.

Learn more 
Find a Partner

Find Amazon Web Services certified consulting and technology partners to help you get started.

Learn more 
Start building in the console

Sign-up and start exploring our services.

Get started