Skip to main content

AWS RDS Database Auto Running Protection Stack

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

View on Construct Hub

This constructor stack includes a function to automatically stop a database or cluster that will automatically start in 7 days.

[!WARNING] v2.1.0: Stack props add option resourceNamingOption default ResourceNamingType.DEFAULT is cdk generated name if you want to maintain compatibility with versions below v2.1.0, please include the following settings (ResourceNamingType.AUTO).

new RDSDatabaseAutoRunningProtectionStack(app, 'RDSDatabaseAutoRunningProtectionStack', {
  stackName: 'rds-database-auto-running-protection-stack',
  targetResource: {
    tagKey: 'AutoRunningProtection',
    tagValues: ['YES'],
  },
  resourceNamingOption: {
    type: RDSDatabaseAutoRunningProtectionStackResourceNamingType.AUTO, // HERE
  },
});

Resources

This construct creating resource list.

  • StepFunctions(StateMachine)
  • IAM Role (StepFunctions)
  • IAM Policy (StepFunctions)
  • EventBridge
  • IAM Role (EventBridge)

Install

TypeScript

install by npm

npm install @gammarers/aws-rds-database-auto-running-protection-stack

install by yarn

yarn add @gammarers/aws-rds-database-auto-running-protection-stack

install by pnpm

pnpm add @gammarers/aws-rds-database-auto-running-protection-stack

install by bun

bun add @gammarers/aws-rds-database-auto-running-protection-stack

Python

pip install gammarers.aws-rds-database-auto-running-protection-stack

C# / .NET

dotnet add package Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack

Example

Code

import { RDSDatabaseAutoRunningProtectionStack } from '@gammarers/aws-rds-database-auto-running-protection-stack';

new RDSDatabaseAutoRunningProtectionStack(app, 'RDSDatabaseAutoRunningProtectionStack', {
  stackName: 'rds-database-auto-running-protection-stack',
  targetResource: {
    tagKey: 'AutoRunningProtection',
    tagValues: ['YES'],
  },
  resourceNamingOption: {
    type: RDSDatabaseAutoRunningProtectionStackResourceNamingType.DEFAULT,
  },
  notifications: {
    emails: [ // "Incoming Sample Message - EMAIL"
      'foo@example.com',
      'bar@example.net',
    ],
    slack: { // "Incoming Sample Message - Slack"
      webhookSecretName: 'example/slack/webhook', // Slack webhook secret
    },
  },
});

Slack webhook secret

Please save it in AWS Secrets Manager in the following format.

get your slack webhook url parts

https://hooks.slack.com/services/<workspace>/<channel>/<whebook>
SecretKey SecretValue
Workspace
Channel
Webhook

Incoming Sample Message

EMAIL

Slack

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for gammarers.aws-rds-database-auto-running-protection-stack 2.7.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gammarers.aws-rds-database-auto-running-protection-stack 2.7.6
File Size Uploaded
gammarers_aws_rds_database_auto_running_protection_stack-2.7.6.tar.gz 230.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gammarers.aws-rds-database-auto-running-protection-stack 2.7.6
File Interpreter ABI Platform
gammarers_aws_rds_database_auto_running_protection_stack-2.7.6-py3-none-any.whl Python 3 none any Details

Total release size: 459.8 kB

Release files / gammarers_aws_rds_database_auto_running_protection_stack-2.7.6.tar.gz

Download URL gammarers_aws_rds_database_auto_running_protection_stack-2.7.6.tar.gz
Size 230.7 kB
Tags Source
SHA-256 checksum
How to use checksums
836990d882f14f67b95f6b80d4f0d12ef099cc62cbb2cd95d65908b019b17b3c
BLAKE2b-256 checksum
How to use checksums
701e5e55442841a71bcaf5e63f0815ff7d062e6c7723677daf7d98cf0d387946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.14.3

Release files / gammarers_aws_rds_database_auto_running_protection_stack-2.7.6-py3-none-any.whl

Download URL gammarers_aws_rds_database_auto_running_protection_stack-2.7.6-py3-none-any.whl
Size 229.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9459b3510b257997d0a7f5e041c9d14efd1e45e05044c45e8ef90d22e3714604
BLAKE2b-256 checksum
How to use checksums
423f081d1f039618a9a941cdce2c94042995829e104205a2d370ec69488f3955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

2.7.6 This release

2 release files

2.7.5

2 release files

2.7.4

2 release files

2.7.3

2 release files

2.7.2

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.18

2 release files

2.5.17

2 release files

2.5.16

2 release files

2.5.14

2 release files

2.5.13

2 release files

2.5.12

2 release files

2.5.11

2 release files

2.5.10

2 release files

2.5.9

2 release files

2.5.8

2 release files

2.5.7

2 release files

2.5.6

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.17

2 release files

2.4.16

2 release files

2.4.15

2 release files

2.4.13

2 release files

2.4.12

2 release files

2.4.11

2 release files

2.4.9

2 release files

2.4.8

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.10

2 release files

2.3.9

2 release files

2.3.8

2 release files

2.3.7

2 release files

2.3.6

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page