This construct is aws rds database or cluster auto running to stop.
Project description
AWS RDS Database Auto Running Protection Stack
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
Slack
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gammarers_aws_rds_database_auto_running_protection_stack-2.7.2.tar.gz.
File metadata
- Download URL: gammarers_aws_rds_database_auto_running_protection_stack-2.7.2.tar.gz
- Upload date:
- Size: 230.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1e092ed4a76ba35145b533335993c196f9657d9397dc87c808f6059f4bbf47c
|
|
| MD5 |
f9d067e9b837e6181fd43ef61886239f
|
|
| BLAKE2b-256 |
f414ae71a18ca68db5116a0bdfdb8d3b6dc9cfea846c709b51add6a0405a6431
|
File details
Details for the file gammarers_aws_rds_database_auto_running_protection_stack-2.7.2-py3-none-any.whl.
File metadata
- Download URL: gammarers_aws_rds_database_auto_running_protection_stack-2.7.2-py3-none-any.whl
- Upload date:
- Size: 228.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c3e3d6fa6ce8c5e66bbb3d551998fead7d4323aea2ed92f267c99e2430c5470
|
|
| MD5 |
62ef04824ddd4b6bff8dd612ac8e6862
|
|
| BLAKE2b-256 |
13e1e0b8d9a66173be9fe6503c2f986508625d57248aae630b0e5c1b4f6eb6cf
|