@gammarers/aws-rds-database-auto-running-protection-stack
v2.2.4
Published
This construct is aws rds database or cluster auto running to stop.
Downloads
445
Readme
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: ResourceNamingType.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
Example
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'],
},
});
License
This project is licensed under the Apache-2.0 License.