Source: Dev.to | Jan 14, 2026 (UTC)
Running EC2 instances and RDS databases 24/7 when they’re only needed during business hours is one of the most common sources of unnecessary AWS costs. Development and testing environments, in particular, can consume significant resources while sitting idle nights and weekends.
By implementing tag-based scheduling, you can automatically start and stop instances based on predefined schedules, reducing costs by up to ~70% for non-production workloads while maintaining full operational control.
In this comprehensive guide, we’ll explore how to automate EC2 and RDS instance scheduling using tags with TagOps, AWS Systems Manager Maintenance Windows to create a robust, cost-effective scheduling solution.
The Cost Impact of Unmanaged Instance Scheduling
Before diving into the solution, let’s understand the problem. Consider a typical development environment:
- Development EC2 Instances: 10 instances (for example m6i.large) running 24/7 at $0.10/hour = $720/month per instance = $7,200/month total
- With Business Hours Scheduling: Running only 50 hours/week (Mon-Fri, 8 AM-6 PM) = $2,000/month total
- Potential Savings: $5,200/month (72% reduction) for development environments alone
For RDS databases, the savings can be even more significant, especially for Multi-AZ deployments. A single db.t3.medium RDS instance running 24/7 costs approximately $52/month, but with proper scheduling, you can reduce this to $15/month for business-hours-only usage — a 72% cost reduction.
Tag-based scheduling provides several critical advantages over manual or hardcoded scheduling approaches:
- Scalability: Automatically include new resources in scheduling without updating automation scripts
- Flexibility: Different schedules for different environments (e.g., dev stops at 6 PM, staging runs 24/7)
- Maintainability: Centralized scheduling logic based on metadata rather than resource IDs
- Consistency: Ensure all resources matching criteria are scheduled, preventing manual configuration errors
- Operational Excellence: Resources are automatically tagged when created, immediately included in scheduling workflows
Understanding the Scheduling Architecture
A tag-based scheduling solution consists of three key components:
- Tagging Automation (TagOps): Automatically applies scheduling tags to EC2 instances and RDS databases when they’re created or discovered
- Scheduling Engine: AWS Systems Manager Maintenance Windows that read tags and execute start/stop actions
- Automation Documents: Pre-built SSM documents like AWS-StartEC2Instance, AWS-StopEC2Instance, AWS-StopRdsInstance and AWS-StartRdsInstance that perform the actual start/stop operations
Step 1: Onboard Your AWS Accounts to TagOps
Before configuring scheduling tags, ensure your AWS accounts are connected to TagOps:
- Navigate to console.tagops.cloud and log in to your account
- Go to the AWS Accounts page and click “Add AWS Account”
-
Provide the required information:
a. AWS Account Name: A descriptive name for your AWS account (e.g., “Production”, “Development”)
b.AWS Account ID: Your 12-digit AWS account number
c. IAM Role Name: The name of the IAM role TagOps will use to access your account
d. External ID: A unique identifier for secure cross-account access -
Create the CloudFormation stack in your AWS account to provision the necessary IAM role
-
Click “Verify Account” to confirm successful onboarding
Step 2: Configure TagOps Rules for EC2/RDS Instance Scheduling
Create a TagOps rule to automatically tag EC2/RDS instances for scheduling in the environment you want to schedule. This ensures that any new instance matching your criteria is immediately included in your scheduling automation.
Scheduling Rule Configuration
Navigate to the Rules page in TagOps and create a new rule with the following configuration:
Condition Operation: AND
Account ID Condition:
- Type: Account ID - Operator: Equal - Value: (your AWS account ID)
Enter fullscreen mode
Exit fullscreen mode










Залишити відповідь