getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
913 stars 113 forks source link

feat: tag obsolete files instead of deleting them #399

Open jaulz opened 1 month ago

jaulz commented 1 month ago

This change tags obsolete files instead of deleting them (see https://github.com/getlift/lift/issues/369). We use copyObject because it resets the time when the object was created and hence triggers the start of the lifecycle rule. Combined with a proper S3 bucket lifecycle rule we can automatically delete these tagged files after a day or so: image

image

Unfortunately, I am not sure what's the best way to set up this lifecycle rule automatically using this library.