Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruct CDK to remove old assets after deploy #7194

Closed
1 of 2 tasks
thekevinbrown opened this issue Apr 6, 2020 · 1 comment
Closed
1 of 2 tasks

Instruct CDK to remove old assets after deploy #7194

thekevinbrown opened this issue Apr 6, 2020 · 1 comment
Assignees
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.

Comments

@thekevinbrown
Copy link

thekevinbrown commented Apr 6, 2020

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

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@thekevinbrown thekevinbrown added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 6, 2020
@SomayaB SomayaB added the @aws-cdk/assets Related to the @aws-cdk/assets package label Apr 9, 2020
@eladb
Copy link
Contributor

eladb commented Apr 10, 2020

Duplicate with aws/aws-cdk-rfcs#64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants