Instance Scheduling
Schedule EC2 and RDS instances to stop outside business hours — saves ~70% of compute cost.
CostLens detects EC2 instances (and single-AZ RDS instances) that run 24/7 but are likely only needed during business hours. Applying a weekday schedule — Mon–Fri, 08:00–18:00 UTC — reduces running time from 168 h/week to 50 h/week, saving approximately 70% of the compute cost with zero changes to your application.
How it works
CostLens scans for candidates
Scans all running EC2 instances (and RDS single-AZ instances) that are not tagged as production and have no existing schedule.
Recommendation card raised
A Recommendation card is raised with the estimated monthly savings (~70% of the instance cost).
Admin or Operator approves
Admin or Operator reviews and clicks Approve & Fix.
IAM role and schedule group created
CostLens creates an IAM execution role (AezonaCostlensSchedulerRole) and a schedule group (AezonaCostlens) in your AWS account if they do not already exist.
EventBridge Scheduler rules created
Two EventBridge Scheduler rules are created: one to STOP the instance at 18:00 UTC Mon–Fri and one to START it at 08:00 UTC Mon–Fri.
Instance is tagged
The instance is tagged with AezonaCostlens:Schedule=weekdays-office-hours so future scans skip it.
EventBridge Scheduler calls the EC2 / RDS API directly — no Lambda function, no third-party scheduler. Schedules live inside your AWS account and are visible in the EventBridge console under Schedules → AezonaCostlens.
Configuring your schedule (Approve & Fix modal)
Clicking Approve & Fix opens a modal with a Schedule step first. You can customise the schedule before applying:
Timezone
Your browser's local timezone is shown automatically. All times you enter are in local time; CostLens converts them to UTC when creating the EventBridge rules.
Weekday hours
Set the ON time (instance starts) and OFF time (instance stops) for Monday–Friday.
UTC / Local toggle
Use the [Local] [UTC] toggle to flip the display. The pickers always edit in local time regardless of the toggle — the toggle is a display-only converter.
Weekend
Choose Off all weekend (default, maximum savings) or Custom hours to keep the instance available on Saturdays and Sundays.
Review savings preview
The savings banner recalculates in real time as you adjust times and weekend mode.
Apply
Click Continue → to proceed to a dry-run preview, then confirm to apply.
EC2 scheduling savings examples
| Instance type | Est. monthly (24/7) | Est. monthly (scheduled) | Savings |
|---|---|---|---|
| t3.micro | $15 | $4.50 | ~$10/mo |
| t3.medium | $30 | $9 | ~$21/mo |
| m5.large | $70 | $21 | ~$49/mo |
| m5.xlarge | $140 | $42 | ~$98/mo |
| c5.xlarge | $124 | $37 | ~$87/mo |
RDS scheduling
RDS scheduling works the same way but has two important constraints:
- Multi-AZ instances cannot be stopped — AWS blocks this at the API level. These are skipped automatically.
- AWS auto-restarts stopped RDS instances after 7 days. The weekday START schedule fires every Monday morning, so the instance is restarted on schedule before the 7-day window elapses.
- RDS stop preserves all data, parameter groups, and security groups.
Required IAM permissions
These are already included in the CostlensApplyFix inline policy (Step 4b in AWS Accounts):
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "CostlensScheduling",
"Effect": "Allow",
"Action": [
"scheduler:CreateSchedule",
"scheduler:CreateScheduleGroup",
"scheduler:GetScheduleGroup",
"iam:GetRole",
"iam:CreateRole",
"iam:PutRolePolicy",
"ec2:CreateTags",
"rds:AddTagsToResource"
],
"Resource": "*"
}]
}The AezonaCostlensSchedulerRole that CostLens creates in your account only has two permissions: ec2:StartInstances / ec2:StopInstances and rds:StartDBInstance / rds:StopDBInstance. It cannot access any other resources.
Skipping production instances
CostLens automatically skips instances with any of the following tags:
Environment=productionorEnvironment=prodEnv=productionorEnv=prod- Any
Nametag containing prod - Instances already tagged with
AezonaCostlens:Schedule
Tip
Tag your dev/staging instances with Environment=staging and production instances with Environment=production for accurate detection.
Limitations
- Schedules are in UTC. Adjust the default 08:00/18:00 times if your team operates in a different timezone.
- Stateful applications that cannot tolerate a daily stop/start should not be scheduled — tag them as production to exclude them.
- Spot instances are managed by AWS and cannot be scheduled this way.
- To remove a schedule, delete the EventBridge rules from the AWS console under EventBridge → Schedules → AezonaCostlens and remove the
AezonaCostlens:Scheduletag from the instance.