What does this AWS Solutions Implementation do?

The AWS Instance Scheduler solution automates the starting and stopping of Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Relational Database Service (Amazon RDS) instances.

This solution helps reduce operational costs by stopping resources that are not in use and starting resources when their capacity is needed. For example, you can use AWS Instance Scheduler to automatically stop instances outside of business hours every day. If you leave all of your instances running at full utilization, this solution can save you up to 70% for those instances that are only necessary during regular business hours (weekly utilization reduced from 168 hours to 50 hours).

Benefits

Cross-account instance scheduling

This solution includes a template that creates the AWS Identity and Access Management (IAM) roles necessary to start and stop instances in secondary accounts.

Add tags to instances

AWS Instance Scheduler 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.

AWS Solution Implementation overview

The diagram below presents the architecture you can automatically deploy using the solution's implementation guide and accompanying AWS CloudFormation template.

AWS Instance Scheduler | Architecture Diagram
 Click to enlarge

AWS Instance Scheduler architecture

Instance scheduling workflow

1.  Amazon EventBridge rule in the hub account periodically invokes AWS Lambda in the hub account.

2. The Lambda function retrieves and evaluates the schedules from the Amazon DynamoDB table to identify the start or stop action for each schedule.

3. A new AWS Systems Manager Automation starts for each schedule and resource type for all the customer-defined accounts and Regions.

4. AWS Systems Manager Automations run in multiple Regions and accounts from the hub account. The details for each automation for any spoke account can be analyzed from the hub account.

5. The custom AWS Systems Manager Automation documents to manage Amazon EC2 state changes.

6. The custom AWS Systems Manager Automation documents uses secondary automations to manage Amazon RDS instance and Aurora cluster states. Custom tags are also applied using AWS Systems Manager Automation documents.

Automated account registration workflow

1.  An Amazon EventBridge rule in the spoke account uses Amazon EventBridge bus in the hub account as a target to automate account registration with the Instance Scheduler service in the hub account. This only occurs if you select the option in the spoke template.

2. The Amazon EventBridge bus forwards the event from the spoke account to the hub event rule.

3. The Amazon EventBridge rule uses the Lambda function as a target to add the spoke account ID into the configuration in the Amazon DynamoDB table.

AWS Instance Scheduler

Version 2.0.0
Release date: 10/2021
Author: AWS

Estimated deployment time: 5 min

Use the button below to subscribe to solution updates.

Note: To subscribe to RSS updates, you must have an RSS plug-in turned on for the browser you are using. 

Did this Solutions Implementation help you?
Provide feedback 
Build icon
Deploy a Solution yourself

Browse our library of AWS Solutions Implementations to get answers to common architectural problems.

Learn more 
Find an APN Partner icon
Find an APN Partner

Find AWS certified consulting and technology partners to help you get started.

Learn more 
Explore icon
Explore Solutions Consulting Offers

Browse our portfolio of Consulting Offers to get AWS-vetted help with solution deployment.

Learn more