🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@gammarers/aws-rds-database-running-schedule-stack

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gammarers/aws-rds-database-running-schedule-stack

AWS RDS Database Running Scheduler

Source
npmnpm
Version
2.6.8
Version published
Weekly downloads
770
-35.08%
Maintainers
1
Weekly downloads
 
Created
Source

AWS RDS Database Running Schedule Stack

GitHub npm (scoped) PyPI Nuget GitHub Workflow Status (branch) GitHub release (latest SemVer)

View on Construct Hub

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).

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

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

EMAIL

Slack

License

This project is licensed under the Apache-2.0 License.

Keywords

aws

FAQs

Package last updated on 27 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts