
Cost Optimization: Scheduling Aurora Start/Stop Times
How to set up automated start/stop scheduling for Aurora clusters to reduce AWS costs
Published Mar 12, 2025
Last Modified Mar 13, 2025
Today, I will showcase a simple method for scheduling the shutdown and startup of an Aurora cluster using Amazon EventBridge Scheduler.
We usually create at least three environments in application projects: development, testing, and production. In most situations, we need to cut costs in non-production environments, so we must stop services that don't require continuous availability.
Amazon EventBridge Scheduler is an AWS service that allows us to create, run, and manage maintenance tasks. We can schedule millions of tasks invoking more than 270 AWS services and over 6000 API operations. AWS offers this excellent alternative to avoid creating Lambdas or cron jobs in a Linux operating system.
The Scheduler offers two methods to call services: Templates and the Universal Target Parameter (UTP). Templates comprise API operations that access the most common AWS services, such as Amazon SQS, Lambda, and ECS. UTP provides a collection of customizable parameters that enable invoking a wider range of API operations for many additional services. Only a few templates have been developed, so we must utilize UTP for our case (Amazon Aurora).
I provide an example of creating a Scheduler that executes the cluster shutdown at 6:00 PM (UTC) from Monday to Friday. We will also develop another Scheduler that initiates the cluster startup at 7:00 AM (UTC) from Monday to Friday. This setup ensures the cluster operates solely during office hours and remains off at night and throughout the weekends. Additionally, I will include the implementation code using Terraform.
Steps to adhere to:

1- Create a role that allows the EventBridge Scheduler to execute the operation:
2- Create a policy with the appropriate permissions and link it to the role:
3- Create the shutdown task and invoke the RDS API "rds:stopDBCluster":
4- Create the startup task and invoke the RDS API "rds:startDBCluster":
5- Check the creation of schedules in the AWS Management Console (Amazon EventBridge > Schedules):

Before we say goodbye, I would like to share this link with additional use cases for how we can utilize Amazon EventBridge Scheduler and UTP:
Thank you very much, and best wishes!