gpt4 book ai didi

amazon-s3 - 如何删除或清除S3上的旧文件?

转载 作者:行者123 更新时间:2023-12-02 19:22:17 25 4
gpt4 key购买 nike

是否有现有的解决方案可以删除超过 x 天的任何文件?

最佳答案

亚马逊推出了object expiration最近。

Amazon S3 Announces Object Expiration

Amazon S3 announced a new feature, Object Expiration that allows you to schedule the deletion of your objects after a pre-defined time period. Using Object Expiration to schedule periodic removal of objects eliminates the need for you to identify objects for deletion and submit delete requests to Amazon S3.

You can define Object Expiration rules for a set of objects in your bucket. Each Object Expiration rule allows you to specify a prefix and an expiration period in days. The prefix field (e.g. logs/) identifies the object(s) subject to the expiration rule, and the expiration period specifies the number of days from creation date (i.e. age) after which object(s) should be removed. Once the objects are past their expiration date, they will be queued for deletion. You will not be billed for storage for objects on or after their expiration date.

关于amazon-s3 - 如何删除或清除S3上的旧文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8984561/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com