Registry / aws / rds-database-running-scheduler

rds-database-running-scheduler

JSON →
library0.1.4jsnpmunverified

AWS CDK v2 construct to automatically start and stop RDS instances and Aurora clusters on a schedule using EventBridge Scheduler and a Lambda with durable execution. Current stable version is 0.1.4, released in April 2026 with active development. Key differentiator: tag-based resource targeting, configurable timezone/weekdays, optional Slack notifications via Secrets Manager, and built-in polling for desired state. Requires aws-cdk-lib ^2.232.0 and constructs ^10.5.1.

npm install rds-database-running-scheduler
INSTALL
IMPORT
SIG · RDS-DATABASE-RUNNI
R
rds-database-running-scheduler
awsjavascriptv0.1.4
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RDSDatabaseRunningScheduler
✓ import { RDSDatabaseRunningScheduler } from 'rds-database-running-scheduler'
✗ const RDSDatabaseRunningScheduler = require('rds-database-running-scheduler')
ESM-only package; no CommonJS support. TypeScript types are bundled.
RDSDatabaseRunningScheduleStack
✓ import { RDSDatabaseRunningScheduleStack } from 'rds-database-running-scheduler'
✗ import RDSDatabaseRunningScheduleStack from 'rds-database-running-scheduler'
This is a named export, not a default export.
TargetResource
✓ import { TargetResource } from 'rds-database-running-scheduler'
✗ import { TargetResourceProps } from 'rds-database-running-scheduler'
Type-only import if using TypeScript: import type { TargetResource } from ...

Creates a CDK app with an RDSDatabaseRunningScheduler to start/stop tagged RDS instances on weekdays at 07:50 UTC and 19:05 UTC.

import { App, Stack } from 'aws-cdk-lib'; import { RDSDatabaseRunningScheduler } from 'rds-database-running-scheduler'; const app = new App(); const stack = new Stack(app, 'TestStack', { env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION } }); new RDSDatabaseRunningScheduler(stack, 'RDSRunningScheduler', { targetResource: { tagKey: 'WorkHoursRunning', tagValues: ['YES'] }, secrets: { slackSecretName: 'my/slack/webhook' }, enableScheduling: true, startSchedule: { timezone: 'UTC', minute: '50', hour: '7', week: 'MON-FRI' }, stopSchedule: { timezone: 'UTC', minute: '5', hour: '19', week: 'MON-FRI' }, }); app.synth();
Debug
Known issues
breakingVersion 0.1.0 introduced the initial API with breaking changes from v0.0.0 (first release).
fix
Upgrade to >=0.1.0 and update construct props to match current API.
affects: <0.1.0
gotchaThe secrets.slackSecretName must reference a Secrets Manager secret with keys 'slackToken' and 'slackChannel'. Missing these keys will cause Lambda runtime errors.
fix
Ensure the secret has the correct JSON structure: {\"slackToken\": \"xoxb-...\", \"slackChannel\": \"#channel\"}
affects: >=0.1.0
gotchaThe construct deploys Lambda functions that require IAM permissions to start/stop RDS instances. If the CDK deployment fails with 'Resource handler returned message: ... is not authorized', the IAM policy may be insufficient.
fix
Check that the Lambda execution role has rds:StartDBInstance, rds:StopDBInstance, rds:StartDBCluster, rds:StopDBCluster permissions.
affects: >=0.1.0
gotchaEventBridge Scheduler is used; ensure the AWS account has the service-linked role for scheduler (AWSServiceRoleForAmazonScheduler). CDK may not create it automatically.
fix
Run: aws iam create-service-linked-role --aws-service-name scheduler.amazonaws.com
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'rds-database-running-scheduler'
Package not installed or typo in package name
fix
Run 'npm install rds-database-running-scheduler' and verify package.json has the correct name.
Property 'startSchedule' is missing in type '{}'
Missing required props when instantiating the construct
fix
Provide startSchedule and stopSchedule objects with at least timezone, minute, hour, week.
TypeError: Cannot read properties of undefined (reading 'slackToken')
The Slack secret in Secrets Manager does not contain the expected keys
fix
Create a secret with JSON: {\"slackToken\": \"...\", \"slackChannel\": \"...\"}
Upgrade
Version history
0.1.4latest on npm
Audit
Dependencies
aws-cdk-librequiredAWS CDK core library with RDS, Lambda, EventBridge Scheduler, and IAM modules
constructsrequiredCDK constructs base library required for Construct class
Agent activity
13 hits · last 30 days
node
12
Resources
rds-database-running-scheduler — npm install rds-database-running-scheduler · libregistry