Instruct CDK to remove old assets after deploy #7194
Labels
@aws-cdk/assets
Related to the @aws-cdk/assets package
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Currently when code assets are updated, a new version is stored in S3. These versions pile up, and there's no built in way to remove the old ones.
Use Case
We're using several Code assets to deploy NodeJS lambda functions to AWS. After a number of deploys, there are 38 files in the staging bucket that are managed by the CDK.
Proposed Solution
It'd be nice to be able to pass a flag to the CDK, either via the
cdk.json
file, as a switch on the command line, or from within the CDK code itself to tell it how many old versions to keep around so the S3 bucket doesn't balloon over time.Alternatively if there were an easy separate command or script I could run to remove the old versions, that'd work too.
Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: