# AWS RDS Database Running Schedule Stack
[](https://github.com/gammarers/aws-rds-database-running-schedule-stack/blob/main/LICENSE)
[](https://www.npmjs.com/package/@gammarers/aws-rds-database-running-schedule-stack)
[](https://pypi.org/project/gammarers.aws-rds-database-running-schedule-stack/)
[](https://www.nuget.org/packages/Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack/)
[](https://github.com/gammarers/aws-rds-database-running-schedule-stack/actions/workflows/release.yml)
[](https://github.com/gammarers/aws-rds-database-running-schedule-stack/releases)
[](https://constructs.dev/packages/@gammarers/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.
> [!WARNING]
> v2.3.0:
> Stack props add option resourceNamingOption
> default ResourceNamingType.DEFAULT is cdk generated name
> f you want to maintain compatibility with versions below `v2.3.0`, please include the following settings (ResourceNamingType.AUTO).
>
> ```python
> new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {
> targetResource: {
> tagKey: 'WorkHoursRunning',
> tagValues: ['YES'],
> },
> resourceNamingOption: {
> type: ResourceNamingType.AUTO, // HERE
> },
> });
> ```
## 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
```shell
npm install @gammarers/aws-rds-database-running-schedule-stack
```
#### install by yarn
```shell
yarn add @gammarers/aws-rds-database-running-schedule-stack
```
#### install by pnpm
```shell
pnpm add @gammarers/aws-rds-database-running-schedule-stack
```
#### install by bun
```shell
bun add @gammarers/aws-rds-database-running-schedule-stack
```
### Python
```shell
pip install gammarers.aws-rds-database-running-schedule-stack
```
### C# / .NET
```shell
dotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack
```
## Example
```python
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
### EMAIL

### Slack

## License
This project is licensed under the Apache-2.0 License.
Raw data
{
"_id": null,
"home_page": "https://github.com/gammarers/aws-rds-database-running-schedule-stack.git",
"name": "gammarers.aws-rds-database-running-schedule-stack",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.9",
"maintainer_email": null,
"keywords": null,
"author": "yicr<yicr@users.noreply.github.com>",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/a8/d5/244f42e2c684c4c77df0e86713967b2832c79b4d3d0651c90de9fe66a32b/gammarers_aws_rds_database_running_schedule_stack-2.6.9.tar.gz",
"platform": null,
"description": "# AWS RDS Database Running Schedule Stack\n\n[](https://github.com/gammarers/aws-rds-database-running-schedule-stack/blob/main/LICENSE)\n[](https://www.npmjs.com/package/@gammarers/aws-rds-database-running-schedule-stack)\n[](https://pypi.org/project/gammarers.aws-rds-database-running-schedule-stack/)\n[](https://www.nuget.org/packages/Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack/)\n[](https://github.com/gammarers/aws-rds-database-running-schedule-stack/actions/workflows/release.yml)\n[](https://github.com/gammarers/aws-rds-database-running-schedule-stack/releases)\n\n[](https://constructs.dev/packages/@gammarers/aws-rds-database-running-schedule-stack)\n\nThis 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.\n\n> [!WARNING]\n> v2.3.0:\n> Stack props add option resourceNamingOption\n> default ResourceNamingType.DEFAULT is cdk generated name\n> f you want to maintain compatibility with versions below `v2.3.0`, please include the following settings (ResourceNamingType.AUTO).\n>\n> ```python\n> new RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {\n> targetResource: {\n> tagKey: 'WorkHoursRunning',\n> tagValues: ['YES'],\n> },\n> resourceNamingOption: {\n> type: ResourceNamingType.AUTO, // HERE\n> },\n> });\n> ```\n\n## Fixed\n\n* RDS Aurora Cluster\n* RDS Instance\n\n## Resources\n\nThis construct creating resource list.\n\n* EventBridge Scheduler execution role\n* EventBridge Scheduler\n* StepFunctions StateMahcine (star or stop controle)\n* StepFunctions StateMahcine execution role\n\n## Install\n\n### TypeScript\n\n#### install by npm\n\n```shell\nnpm install @gammarers/aws-rds-database-running-schedule-stack\n```\n\n#### install by yarn\n\n```shell\nyarn add @gammarers/aws-rds-database-running-schedule-stack\n```\n\n#### install by pnpm\n\n```shell\npnpm add @gammarers/aws-rds-database-running-schedule-stack\n```\n\n#### install by bun\n\n```shell\nbun add @gammarers/aws-rds-database-running-schedule-stack\n```\n\n### Python\n\n```shell\npip install gammarers.aws-rds-database-running-schedule-stack\n```\n\n### C# / .NET\n\n```shell\ndotnet add package Gammarers.CDK.AWS.RdsDatabaseRunningScheduleStack\n```\n\n## Example\n\n```python\nimport { RDSDatabaseRunningScheduleStack, ResourceNamingType } from '@gammarer/aws-rds-database-running-schedule-stack';\n\nnew RDSDatabaseRunningScheduleStack(app, 'RDSDatabaseRunningScheduleStack', {\n targetResource: {\n tagKey: 'WorkHoursRunning', // already tagging to rds instance or cluster\n tagValues: ['YES'], // already tagging to rds instance or cluster\n },\n enableScheduling: true,\n startSchedule: {\n timezone: 'Asia/Tokyo',\n minute: '55',\n hour: '8',\n week: 'MON-FRI',\n },\n stopSchedule: {\n timezone: 'Asia/Tokyo',\n minute: '5',\n hour: '19',\n week: 'MON-FRI',\n },\n resourceNamingOption: {\n type: ResourceNamingType.AUTO, // DEFAULT or AUTO or CUSTOM\n },\n notifications: {\n emails: [ // \"Incoming Sample Message - EMAIL\"\n 'foo@example.com',\n 'bar@example.net',\n ],\n slack: { // \"Incoming Sample Message - EMAIL\"\n webhookSecretName: 'example/slack/webhook',\n },\n },\n});\n```\n\n## Incoming Sample Message\n\n### EMAIL\n\n\n\n### Slack\n\n\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "AWS RDS Database Running Scheduler",
"version": "2.6.9",
"project_urls": {
"Homepage": "https://github.com/gammarers/aws-rds-database-running-schedule-stack.git",
"Source": "https://github.com/gammarers/aws-rds-database-running-schedule-stack.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "22b047aa45d646702ac0b3ed584546e3145733c430bbe672b394a0f3d9ec8502",
"md5": "7566f0254392ee1dbd539a33b7215094",
"sha256": "ac1209e0175a42d692ca2596714e64700c7251748ace91060a070b3c962e54fb"
},
"downloads": -1,
"filename": "gammarers_aws_rds_database_running_schedule_stack-2.6.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7566f0254392ee1dbd539a33b7215094",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.9",
"size": 222398,
"upload_time": "2025-09-03T20:26:15",
"upload_time_iso_8601": "2025-09-03T20:26:15.604576Z",
"url": "https://files.pythonhosted.org/packages/22/b0/47aa45d646702ac0b3ed584546e3145733c430bbe672b394a0f3d9ec8502/gammarers_aws_rds_database_running_schedule_stack-2.6.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a8d5244f42e2c684c4c77df0e86713967b2832c79b4d3d0651c90de9fe66a32b",
"md5": "1efa73bd9fbbd2d1dfc3cad18859654c",
"sha256": "08a0d90577f136188ac24fa4a578d6e5361d0978006f82900e9b5bd560c47fbc"
},
"downloads": -1,
"filename": "gammarers_aws_rds_database_running_schedule_stack-2.6.9.tar.gz",
"has_sig": false,
"md5_digest": "1efa73bd9fbbd2d1dfc3cad18859654c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.9",
"size": 223832,
"upload_time": "2025-09-03T20:26:17",
"upload_time_iso_8601": "2025-09-03T20:26:17.002959Z",
"url": "https://files.pythonhosted.org/packages/a8/d5/244f42e2c684c4c77df0e86713967b2832c79b4d3d0651c90de9fe66a32b/gammarers_aws_rds_database_running_schedule_stack-2.6.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-03 20:26:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gammarers",
"github_project": "aws-rds-database-running-schedule-stack",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gammarers.aws-rds-database-running-schedule-stack"
}