Something went wrong!
Hang in there while we get back on track
Simple AWS EC2 Instance Scheduling
Basic cost optimization for 2 EC2 instances with standard 9-5 work hours. Demonstrates savings calculation, AWS Instance Scheduler setup, and gradual rollout protocol.
Input
What you provide to the skill
We run 2 EC2 instances on AWS in our dev environment. Work hours are 9am-5pm EST, Monday-Friday. How much can we save?
Output
What the skill generates for you
Dev Environment Cost Optimization Plan
Your Savings Analysis
Current Setup:
- 2 EC2 instances running 24/7
- Work schedule: 9am-5pm EST, Monday-Friday
- Assumed instance type: t3.medium (common dev instance)
Cost Breakdown:
Current Monthly Cost (24/7):
- 2x t3.medium @ $0.0416/hour
- 2 x $0.0416/hr x 730 hrs/month = $60.74/month
- Annual: $728.88/year
Hours Analysis:
Total hours per month: 730 hours (24/7)
Work hours per month: 173 hours (8 hrs/day x 21.6 work days)
Idle hours per month: 557 hours (76.3%)
Projected Savings
Monthly Savings: $46.07
Annual Savings: $552.84
Savings Percentage: 76.3%
ROI Timeline: Immediate
Implementation Scripts
Option A: AWS Instance Scheduler (Recommended)
Step 1: Deploy via CloudFormation
- Go to AWS Console -> CloudFormation -> Create Stack
- Use AWS Solutions Library template for Instance Scheduler
Step 2: Create Schedule in DynamoDB
# Create period definition (9am-5pm weekdays)
aws dynamodb put-item \
--table-name InstanceScheduler-ConfigTable-xxxxx \
--item '{
"type": {"S": "period"},
"name": {"S": "work-hours"},
"begintime": {"S": "09:00"},
"endtime": {"S": "17:00"},
"weekdays": {"SS": ["mon", "tue", "wed", "thu", "fri"]}
}'
# Create schedule
aws dynamodb put-item \
--table-name InstanceScheduler-ConfigTable-xxxxx \
--item '{
"type": {"S": "schedule"},
"name": {"S": "dev-work-schedule"},
"periods": {"SS": ["work-hours"]},
"timezone": {"S": "America/New_York"}
}'
Step 3: Tag Your EC2 Instances
aws ec2 create-tags \
--resources i-xxxxxxxxx i-yyyyyyyyy \
--tags Key=Schedule,Value=dev-work-schedule
Option B: EventBridge + Lambda
# Start at 9am EST (2pm UTC) Monday-Friday
aws events put-rule \
--name start-dev-instances \
--schedule-expression "cron(0 14 ? * MON-FRI *)" \
--description "Start dev instances at 9am EST"
# Stop at 5pm EST (10pm UTC) Monday-Friday
aws events put-rule \
--name stop-dev-instances \
--schedule-expression "cron(0 22 ? * MON-FRI *)" \
--description "Stop dev instances at 5pm EST"
Testing Protocol
Week 1: Test with ONE instance
- Tag single instance, monitor for 5 days
- Verify start/stop times and application functionality
Week 2: Full rollout
- Add second instance
- Monitor daily
Rollback Procedure
# Remove schedule tags
aws ec2 delete-tags \
--resources i-xxxxxxxxx i-yyyyyyyyy \
--tags Key=Schedule
# Manually start if needed
aws ec2 start-instances --instance-ids i-xxxxxxxxx i-yyyyyyyyy
Summary
What You’re Getting:
- $46.07/month savings ($552.84/year)
- 76.3% reduction in dev environment costs
- 2-4 hours implementation time
- Safe, gradual rollout with full rollback capability
Next Action: Choose Option A or B, tag ONE instance today, and start saving immediately.
About This Skill
Reduce dev/staging cloud costs by 60-70% through intelligent scheduling. Get cloud-specific scripts and savings calculations for AWS, GCP, or Azure.
View Skill DetailsMore Examples
AWS Dev Environment with CI/CD Constraints
Cost optimization for a complex setup with EC2, RDS, and Kubernetes that must preserve nightly CI/CD builds. Shows prioritized implementation and extended scheduling.
Multi-Region Scheduling for Global Teams
Regional Independence Model for teams across US, EU, and Asia timezones. Demonstrates per-region schedules, tiered approach, and multi-cloud implementation.