S3 bucket only keep specific numbers of objects #24224
Replies: 1 comment 1 reply
-
Maybe you can play around with S3 Bucket Versioning: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html. The use case for object versioning seem similar to the use case you describe. I'm sure you've looked into S3 Lifecycle Rules as well: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html. I think you can play around with tags and SDK calls only, and specify a Lifecycle filter that's something like "if tagged with AFAIK, the canonical way is to use lambdas here, but I think you can replace the lambda function with a script that hits some SDK calls if you really want to, and run that script on a different engine if you so choose. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
as you see from the title i want to only keep 3 newest objects of the bucket and delete the rest (the objects are backups that upload from my site automatically everyday and they dont have the same name )
i heard that i have to use lambda function but as i know i have to pay them per request
so is there any help that i can do it with the policy or the life cycle ?
Beta Was this translation helpful? Give feedback.
All reactions