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 { RDSDatabaseRunningScheduleStack, ResourceNamingType } 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',
},
resourceNamingOption: {
type: ResourceNamingType.AUTO, // DEFAULT or AUTO or CUSTOM
},
notifications: {
emails: [ // "Incoming Sample Message - EMAIL"
'foo@example.com',
'bar@example.net',
],
slack: { // "Incoming Sample Message - EMAIL"
webhookSecretName: 'example/slack/webhook',
},
},
});
Incoming Sample Message
Slack
License
This project is licensed under the Apache-2.0 License.
Metadata
Release files for gammarers.aws-rds-database-running-schedule-stack 2.8.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gammarers_aws_rds_database_running_schedule_stack-2.8.5.tar.gz | 225.8 kB | Without provenance | Details for gammarers_aws_rds_database_running_schedule_stack-2.8.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gammarers_aws_rds_database_running_schedule_stack-2.8.5-py3-none-any.whl | Python 3 | none | any | Details for gammarers_aws_rds_database_running_schedule_stack-2.8.5-py3-none-any.whl |
Total release size: 450.1 kB
Release files / gammarers_aws_rds_database_running_schedule_stack-2.8.5.tar.gz
| Download URL | gammarers_aws_rds_database_running_schedule_stack-2.8.5.tar.gz |
|---|---|
| Size | 225.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d7ed69136900cb78033fd06bff9e9f5ebe7627531f185faa533bae95af10843
|
|
BLAKE2b-256 checksum How to use checksums |
5f093282db5f163993126fc3df890d2e1268e514ff2c8121801370dec224e9ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.14.2
|
Release files / gammarers_aws_rds_database_running_schedule_stack-2.8.5-py3-none-any.whl
| Download URL | gammarers_aws_rds_database_running_schedule_stack-2.8.5-py3-none-any.whl |
|---|---|
| Size | 224.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1178672d3841b38dc81123e7ab5f3fb2a12e6b37a06711ccc7eeb378a3ffe19c
|
|
BLAKE2b-256 checksum How to use checksums |
c181f1348341e97609b60b92f6a85cce6db7900aaeb75528065e019f146e0d4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.14.2
|
Security for gammarers.aws-rds-database-running-schedule-stack 2.8.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.