SnoozeDB vs EventBridge + Lambda
A DIY scheduler uses EventBridge rules or EventBridge Scheduler to invoke a Lambda function that calls StopDBInstance and StartDBInstance on tagged databases. It costs almost nothing to run and stays fully in your account, but your team writes and maintains the code, IAM, production safeguards, overrides, and handling of the AWS 7-day automatic restart. SnoozeDB provides those pieces as a hosted service.
Side-by-side
| Criterion | EventBridge + Lambda | SnoozeDB |
|---|---|---|
| Setup | Write the function, IAM role, rules, and deployment (IaC) | Deploy one CloudFormation stack, then use the dashboard |
| Runs in | Your AWS account | SnoozeDB, through a cross-account role with External ID |
| Production safety | Your tag-filtering code | Opt-in triage, snoozedb:enabled=false, organization tag rules, locks |
| 7-day automatic restart | Needs extra logic to re-stop instances AWS started | Reconciled at the next pass for instances that should be stopped |
| Temporary override | Disable the rule or add override logic | Temporary start for a chosen duration, from the dashboard or Slack |
| Visibility | CloudWatch Logs | Dashboard state and Activity Logs |
| Multi-account | Cross-account roles and deployment per account | One role per account, managed from one workspace |
| Cost | Lambda and EventBridge usage (usually cents) plus engineering time | Free for 1 managed RDS database; paid plans from $19/month for 5 managed resources |
How to choose
Choose EventBridge + Lambda when
- One account, a handful of databases, a fixed schedule, and a team happy to own the code.
- Nothing may assume a role in your accounts from outside your organization.
- Scheduling must live in your existing IaC pipeline and code review.
- You need actions SnoozeDB does not offer, such as Aurora cluster stops or custom pre-stop hooks.
Choose SnoozeDB when
- Several accounts, regions, or teams, with schedules that change.
- Developers need to keep a database running late without editing code or rules.
- You want production protection, overrides, and an audit trail without writing them.
What SnoozeDB does not do
- Does not schedule Aurora clusters or Multi-AZ DB cluster members.
- No custom code hooks before or after a stop.
- Paid plans are required beyond one managed database or for EC2 and EKS scheduling.
The minimum DIY implementation
The Lambda execution role needs rds:DescribeDBInstances, rds:StopDBInstance, and rds:StartDBInstance. A minimal Python handler for databases tagged AutoStop=true, skipping cluster members that AWS cannot stop individually:
import boto3
rds = boto3.client("rds")
def handler(event, context):
action = event["action"] # "stop" or "start"
for page in rds.get_paginator("describe_db_instances").paginate():
for db in page["DBInstances"]:
tags = {t["Key"]: t["Value"] for t in db.get("TagList", [])}
if tags.get("AutoStop") != "true" or db.get("DBClusterIdentifier"):
continue
if action == "stop" and db["DBInstanceStatus"] == "available":
rds.stop_db_instance(DBInstanceIdentifier=db["DBInstanceIdentifier"])
if action == "start" and db["DBInstanceStatus"] == "stopped":
rds.start_db_instance(DBInstanceIdentifier=db["DBInstanceIdentifier"])Two schedules invoke it, for example cron(0 19 ? * MON-FRI *) with {"action": "stop"} and cron(0 7 ? * MON-FRI *) with {"action": "start"}. EventBridge Scheduler accepts a timezone; classic EventBridge cron rules run in UTC.
FAQ
- Does AWS provide this scheduler out of the box?
- AWS publishes Instance Scheduler on AWS, a deployable solution built on EventBridge, Lambda, and DynamoDB. It is still deployed and operated by your team.
- Is the DIY approach cheaper?
- The AWS usage is usually negligible. The real cost is the engineering time to write, test, and maintain the code and its safeguards.