-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
clean up the aws-sam-cli-managed-default bucket artifacts #2980
Comments
@aprilmintacpineda The short answer is we don't know what artifacts to leave around and remove. The CLI uses this as a place to put artifacts and don't have a way to remove others. You can add an appropriate, to your use-case, lifecycle policy to remove old artifacts. The managed stack is created under deploy right now, so I think we would need to consider bring up the For now, it's up to the customer to keep it clean. I know that isn't the best answer :(. |
Being able to define a lifecycle policy for the buckets would great. Maybe appropriate for another ticket but being able to define a lifecycle policy for the ECR repos for the container images that my container based lambdas use would be great too. |
… the aws-sam-cli artifacts S3 bucket After repeated deployments, these lingering artifacts end up taking space in the S3 bucket and your account will be charged for the storage, so this is a way to manually clean them out. See: aws/aws-sam-cli#2980
I would like to "revive" this issue...
As far as I've understood it (might be very wrong on this), at present, there is no way to write such a lifecycle rule. At least not for generic use-cases. The point is that POSSIBLE WORKAROUND:
That would be awesome! :) Just thinking out loud (without knowing the actual complexity of this on your side) but, alternatively, you could add an option to POSSIBLE WORKAROUND: Something like:
Where the
Or by querying the current version of the artifact via:
But it's far from ideal and, above all, one would lose the ability to test the CloudFormation stack locally as |
Description:
Steps to reproduce:
Create a project and deploy to a stage multiple times.
Observed result:
You'll see multiple artifacts but seems not needed anyways.
Expected result:
The s3 bucket should be kept cleaned.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: LatestAdd --debug flag to command you are running
After months of using AWS sam my bucket has reached 15 GB in file size, so I wondered why AWS SAM simply leaves the default bucket bloated with unneeded files.
The text was updated successfully, but these errors were encountered: