Automatic Start and Stop Scheduler for AWS RDS
Project description
CDK RDS Scheduler Construct
This is a CDK construct for creating a schedule to periodically start and stop RDS (Aurora) clusters or instances. It can be used to reduce billing outside of operational hours.
Usage
Install it via npm:
npm install cdk-rds-scheduler
Then use it in your CDK stack:
import { RdsScheduler, Cron } from 'cdk-rds-scheduler';
import { TimeZone } from 'aws-cdk-lib/core';
// for DatabaseCluster
declare const databaseCluster: rds.DatabaseCluster;
new RdsScheduler(this, 'RdsClusterScheduler', {
cluster: databaseCluster,
schedule: [
// Operate only during daytime on weekdays
{
start: new Cron({ minute: '0', hour: '8', day: '?', weekDay: 'MON-FRI' }),
stop: new Cron({ minute: '0', hour: '18', day: '?', weekDay: 'MON-FRI' }),
timeZone: TimeZone.ASIA_TOKYO,
},
],
});
// for DatabaseInstance
declare const databaseInstance: rds.DatabaseInstance;
new RdsScheduler(this, 'RdsInstanceScheduler', {
instance: databaseInstance,
schedule: [
// Put the instance into a dormant state.
// As a measure for automatic start of Aurora, stop it every day.
{
stop: new Cron({ minute: '0', hour: '0', day: '?', weekDay: '*' }),
// timeZone is optional, default is UTC
},
],
});
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rds_scheduler-1.1.6.tar.gz
(76.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rds_scheduler-1.1.6.tar.gz.
File metadata
- Download URL: rds_scheduler-1.1.6.tar.gz
- Upload date:
- Size: 76.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
578155797135564b696b69c89db7c180f46350a902855ea24088fb93f4e40d99
|
|
| MD5 |
95d5cad7a2975c2f318891a22cc200af
|
|
| BLAKE2b-256 |
577f9d309ffdc087c42a0795017ab5586eaceb88fb349dc37a8ea09ea31e05df
|
File details
Details for the file rds_scheduler-1.1.6-py3-none-any.whl.
File metadata
- Download URL: rds_scheduler-1.1.6-py3-none-any.whl
- Upload date:
- Size: 75.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a78df0a812a2a6a69b716175e5dc25b9b54ef60b76dc981eef8fd8f51ac5b0c4
|
|
| MD5 |
4feac5626d18a1c9d49bddb18296445e
|
|
| BLAKE2b-256 |
bc982f6f506f0ea1b501a6cc2c53ea82acebc8af1442f78a8ed7e624b00b0a11
|