Repository navigation
The meaning of various cdk assets and implications of deleting them #22738
Unanswered
ustulation
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I was wondering if someone could let me know of the implications of getting rid of various "types" of assets in cdk assets directory.
CodePipelineI end up withcdk-hnb659fds-assets-<acc-no>-<region>: This mostly hasjsonCFntemplate files for the pipeline stack itself. My pipeline stack doesn't have anything else like a lambda and so on. I suppose if it had say aLambdawhich needed a source codezipthen thatzipwould be here too.cdk.outproduced bycdk syntheach time it executes in the pipeline and another dir which seems to contain zipped result of a git clone of the source repo that the pipeline is listening to (via codestar connection toGitHubin my case) for source code changes.s3-external.amazonaws.combucket which i can see fromCFnconsole if I manually create a stack) - so I don't know when would these template jsons be ever needed - even during rollbacks.cdk.outand a zipped source code from github, per deployment)? When are these needed and what's the drawback of say creating a lifecycle policy to just get rid of all objects > 1 day old in these buckets?CFn. I'm planning to run some code that checks all templates in an account+region and gets rid of all the remaining zip assets and images which have no mention in the template provided there's noCFnstack inin-progressstate (whether create-in-progress or roll-back-in-progress etc). If it's in progress then it's not safe to delete anything because I wouldn't know if the template i got by queryingCFnwas the new one which is in progress or the previous one before the progress.(3) Above could be much simpler if
cdkdid a unique prefix (or bucket) per stack. Then I could just delete all the artifacts not referenced by a template, after it has successfully been deployed, by creating a post-deployment action in the pipeline. However since all other unrelated stacks share the same bucket+prefix this becomes impossible to do since some of them might be in somein-progressstate or the other.Q) However does (1) and (2) sound reasonable or what are the caveats?
All reactions