We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.
If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”
Customize cookie preferences
We use cookies and similar tools (collectively, "cookies") for the following purposes.
Essential
Essential cookies are necessary to provide our site and services and cannot be deactivated. They are usually set in response to your actions on the site, such as setting your privacy preferences, signing in, or filling in forms.
Performance
Performance cookies provide anonymous statistics about how customers navigate our site so we can improve site experience and performance. Approved third parties may perform analytics on our behalf, but they cannot use the data for their own purposes.
Allowed
Functional
Functional cookies help us provide useful site features, remember your preferences, and display relevant content. Approved third parties may set these cookies to provide certain site features. If you do not allow these cookies, then some or all of these services may not function properly.
Allowed
Advertising
Advertising cookies may be set through our site by us or our advertising partners and help us deliver relevant marketing content. If you do not allow these cookies, you will experience less relevant advertising.
Allowed
Blocking some types of cookies may impact your experience of our sites. You may review and change your choices at any time by selecting Cookie preferences in the footer of this site. We and selected third-parties use cookies or similar technologies as specified in the AWS Cookie Notice.
Your privacy choices
We display ads relevant to your interests on AWS sites and on other properties, including cross-context behavioral advertising. Cross-context behavioral advertising uses data from one site or app to advertise to you on a different company’s site or app.
To not allow AWS cross-context behavioral advertising based on cookies or similar technologies, select “Don't allow” and “Save privacy choices” below, or visit an AWS site with a legally-recognized decline signal enabled, such as the Global Privacy Control. If you delete your cookies or visit this site from a different browser or device, you will need to make your selection again. For more information about cookies and how we use them, please read our AWS Cookie Notice.
К сожалению, данный материал на выбранном языке не доступен. Мы постоянно работаем над расширением контента, предоставляемого пользователю на выбранном языке. Благодарим вас за терпение!
Instance Scheduler on AWS automates the starting and stopping of various AWS 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 AWS Solution uses resource tags and AWS Lambda to automatically stop and start instances based on a schedule you define, and it can be deployed across multiple AWS 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 AWS Well-Architected Cost Optimization best practices.
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.
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 AWS Systems Manager maintenance window
For EC2 instances, this solution can use Systems Manager maintenance windows defined in the same AWS 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 AWS CloudFormation templates, or get started with the resources below:
Step 1 This AWS 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 AWS Lambda orchestration function. This will determine the list of AWS 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 AWS 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 AWS CloudFormation Custom resource.
Step 8 If AWS Orgs Mode is enabled and a valid Organization ID is provided when the solution is deployed, Instance Scheduler on AWS 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 AWS Organization.
Step 5 If auto scaling group (ASG) scheduling is enabled, Instance Scheduler on AWS 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 AWS CloudFormation Custom resource.
Step 8 If AWS Orgs Mode is enabled and a valid Organization ID is provided when the solution is deployed, Instance Scheduler on AWS 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 AWS Organization.
Step 1 This AWS 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 AWS Lambda orchestration function. This will determine the list of AWS 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 AWS 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 AWS CloudFormation Custom resource.
Step 8 If AWS Orgs Mode is enabled and a valid Organization ID is provided when the solution is deployed, Instance Scheduler on AWS 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 AWS Organization.
Step 1 This AWS 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 AWS Lambda orchestration function. This will determine the list of AWS 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.
Related content
Resource Scheduler
With Quick Setup, a capability of AWS Systems Manager, you can configure Resource Scheduler to automate the starting and stopping of your EC2 instances across your AWS accounts and Regions. Resource Scheduler provides a simple user interface (UI).
To learn more about Resource Scheduler, review related resources in the implementation guide.
Build modern, scalable applications on AWS to transform your organization, all while optimizing costs through Cost Optimization with AWS. The variety of AWS pricing options provides you with the flexibility to design your purchase plan to meet your specific workload needs.
Cost Optimization Pillar - AWS 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.
Cloud Foundations - Guidance for Cloud Financial Management on AWS
This Guidance helps you set up a Cloud Financial Management (CFM) capability to manage and optimize your expenses for cloud services. This capability includes near real-time visibility and cost and usage analysis to support decision-making for topics such as spend dashboards, optimization, spend limits, chargeback, and anomaly detection and response.