AWS RDS Database Running Scheduler
Project description
AWS RDS Database Running Schedule Stack
This AWS CDK Construct Stack controls the starting and stopping of RDS DB instances and clusters based on specified tags, ensuring they only run during working hours. It uses EventBridge Scheduler to trigger a StepFunctions State Machine at the start and end of the working hours(default 07:50(UTC) - 21:10(UTC)), which then starts or stops the databases depending on the mode.
Fixed
- RDS Aurora Cluster
- RDS Instance
Resources
This construct creating resource list.
- EventBridge Scheduler execution role
- EventBridge Scheduler
- StepFunctions StateMahcine (star or stop controle)
- StepFunctions StateMahcine execution role
Install
TypeScript
install by npm
npm install @gammarers/aws-rds-database-running-schedule-stack
install by yarn
yarn add @gammarers/aws-rds-database-running-schedule-stack
install by pnpm
pnpm add @gammarers/aws-rds-database-running-schedule-stack
install by bun
bun add @gammarers/aws-rds-database-running-schedule-stack
Python
pip install gammarers.aws-rds-database-running-schedule-stack
C# / .NET
dotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack
Example
import { RdsDatabaseRunningScheduler, DatabaseType } from '@gammarer/aws-rds-database-running-schedule-stack';
new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
targetResource: {
tagKey: 'WorkHoursRunning', // already tagging to rds instance or cluster
tagValues: ['YES'], // already tagging to rds instance or cluster
},
enableScheduling: true,
startSchedule: {
timezone: 'Asia/Tokyo',
minute: '55',
hour: '8',
week: 'MON-FRI',
},
stopSchedule: {
timezone: 'Asia/Tokyo',
minute: '5',
hour: '19',
week: 'MON-FRI',
},
});
License
This project is licensed under the Apache-2.0 License.
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
Built Distribution
File details
Details for the file gammarers_aws_rds_database_running_schedule_stack-2.2.5.tar.gz
.
File metadata
- Download URL: gammarers_aws_rds_database_running_schedule_stack-2.2.5.tar.gz
- Upload date:
- Size: 56.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47f5177a99af4e40c33ec14a5c0d5bdc6f72911e4dcfbd6418d472f9c3e360f4 |
|
MD5 | b93c79caa75cb43377e9134143818d13 |
|
BLAKE2b-256 | e340232cfb966dd82414871af6e6513f3b800ff1d0dad4fb9a43883771556c7e |
File details
Details for the file gammarers.aws_rds_database_running_schedule_stack-2.2.5-py3-none-any.whl
.
File metadata
- Download URL: gammarers.aws_rds_database_running_schedule_stack-2.2.5-py3-none-any.whl
- Upload date:
- Size: 55.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0085fa5a9fcd8418770b87e09696803eb5f9b20f051658da5ac49de7480a9ab8 |
|
MD5 | 238983fe4ffddfe897aa5efa2833adb0 |
|
BLAKE2b-256 | 4882327d8d8d05e819ca3c7bdf6591b31fe9567c01684f268ef269062700f880 |