cdk-aws-cleaner
TypeScript icon, indicating that this package has built-in type declarations

1.3.6 • Public • Published

npm GitHub last commit (branch) GitHub issues

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: "aws@zerodotfive.com"
    });

Properties

Name Type Description
cleanup aws-cdk-lib.Duration When the Stack should be removed.

cleanupRequired
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 aws@zerodotfive.com. We are a German company based in Hamburg, specializing in AWS services and solutions.

Package Sidebar

Install

npm i cdk-aws-cleaner

Weekly Downloads

551

Version

1.3.6

License

Apache-2.0

Unpacked Size

151 kB

Total Files

12

Last publish

Collaborators

  • blingsen