2.4.15 • Published 8 months ago

@gammarers/aws-rds-database-auto-running-protection-stack v2.4.15

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

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>
SecretKeySecretValue
Workspace\<workspace>
Channel\<channel>
Webhook\<whebook>

Incoming Sample Message

EMAIL

npm.io

Slack

npm.io

License

This project is licensed under the Apache-2.0 License.

2.2.1

1 year ago

2.2.0

1 year ago

2.4.1

11 months ago

2.2.3

1 year ago

2.0.5

1 year ago

2.4.0

11 months ago

2.2.2

1 year ago

2.0.4

1 year ago

2.4.3

10 months ago

2.2.5

1 year ago

2.4.2

11 months ago

2.2.4

1 year ago

2.0.6

1 year ago

2.4.5

10 months ago

2.2.7

1 year ago

2.4.4

10 months ago

2.2.6

1 year ago

2.3.8

12 months ago

2.3.7

12 months ago

2.3.9

11 months ago

2.3.0

12 months ago

2.1.2

1 year ago

2.1.1

1 year ago

2.3.2

12 months ago

2.3.1

12 months ago

2.1.3

1 year ago

2.4.14

8 months ago

2.3.4

12 months ago

2.4.13

8 months ago

2.3.3

12 months ago

2.3.6

12 months ago

2.4.15

8 months ago

2.3.5

12 months ago

2.4.10

9 months ago

2.4.12

8 months ago

2.4.11

9 months ago

2.1.0

1 year ago

2.4.7

9 months ago

2.4.6

10 months ago

2.4.9

9 months ago

2.4.8

9 months ago

2.3.11

11 months ago

2.3.10

11 months ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago