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
- Host: GitHub
- URL: https://github.com/onhate/cdk-gc
- Owner: onhate
- License: mit
- Archived: true
- Created: 2023-10-13T19:32:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-15T13:14:25.000Z (about 1 year ago)
- Last Synced: 2025-03-20T08:11:36.748Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 23
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.