cdk-aws-cleaner
v1.3.6
Published
The construct cleans up the stack it is integrated with after a defined time period has passed.
Downloads
3,515
Maintainers
Readme
AWS CDK Auto-Deletion Construct: Automate CloudFormation stack removal after a set time.
Simplifies cleanup, reduces costs, and promotes efficient resource management.
This is espacially useful, if you deploy a demo stack or an expirement. It will be removed automatically for you.
The AWS CDK Auto-Deletion Construct is a powerful infrastructure-as-code (IaC) tool that enables you to automatically remove an AWS CloudFormation stack after a specified period. Built on top of the AWS Cloud Development Kit (CDK), this construct simplifies the process of managing the lifecycle of your infrastructure resources.
By leveraging the AWS CDK Auto-Deletion Construct, you can ensure the efficient usage of your AWS resources while avoiding unnecessary costs and clutter in your AWS account. This construct automates the deletion of stacks that are no longer needed, streamlining the cleanup process and promoting a tidy and cost-effective environment.
Key Features:
Automated Stack Removal: The Auto-Deletion Construct enables you to set an expiration time for your CloudFormation stack. Once the specified time has elapsed, the construct automatically triggers the removal process, effectively eliminating the need for manual intervention.
Seamless Integration: The Auto-Deletion Construct seamlessly integrates with existing AWS CDK applications. You can easily incorporate it into your CDK stacks, alongside other constructs, to enable automatic deletion functionality for specific resources or entire infrastructure deployments.
Security and Control: The Auto-Deletion Construct follows AWS best practices for security and permissions. This helps prevent accidental or unauthorized deletions.
Notifcation: You are now informed via mail, when the remval of the stack is triggered.
The AWS CDK Auto-Deletion Construct empowers developers and DevOps teams to effectively manage their AWS infrastructure by automating the removal of unused resources. With its simplicity, flexibility, and integration capabilities, this construct streamlines the cleanup process and optimizes resource utilization, ultimately contributing to a more cost-efficient and organized AWS environment.
TL;TR;
Use our construct by installing the module and using our construct in your code:
npm i -g aws-cdk
npm i aws-cdk-lib
npm i cdk-aws-cleaner
import { AwsCleaner } from 'cdk-aws-cleaner'
new AwsCleaner(this, 'aws-cleaner', {
cleanup: cdk.Duration.minutes(60),
email: "[email protected]"
});
Properties
| Name | Type | Description | | ------------------------------------------------------------------------------------- | --------------------------------- | --------------------------------- | | cleanup | aws-cdk-lib.Duration | When the Stack should be removed. |
cleanup
Required
public readonly cleanup: Duration;
- Type: aws-cdk-lib.Duration
When the Stack should be removed.
For any further assistance or support, please don't hesitate to contact us at [email protected]. We are a German company based in Hamburg, specializing in AWS services and solutions.