An open API service indexing awesome lists of open source software.

https://github.com/onhate/cdk-gc

Garbage collects CDK S3 Deployment Bucket
https://github.com/onhate/cdk-gc

Last synced: 10 months ago
JSON representation

Garbage collects CDK S3 Deployment Bucket

Awesome Lists containing this project

README

          

# WARNING

CDK has officially released a gc feature https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cmd-gc.html

# cdk-gc

## Overview

`cdk-gc` is a utility CLI tool designed to assist in the cleanup of unused assets of your CDK AWS CloudFormation stacks. It
identifies and removes assets stored in the CloudFormation Deployment buckets that are no longer referenced by active stacks.

see https://github.com/aws/aws-cdk-rfcs/issues/64

## Usage

```bash
npx onhate/cdk-gc gc --profile --region [--yes]
```

## Options

- --profile: Specify the AWS profile to use for authentication. (optional)
- --region: Set the AWS region for the cleanup operation.
- --yes (Optional): Confirm and execute the cleanup (default to dry-run).

*Note*: Use this utility with caution, and thoroughly review the identified assets before confirming the cleanup.