AWS:使用“生命周期规则"在30天之内永久删除S3对象 [英] AWS: Delete Permanently S3 objects less than 30 days using 'Lifecycle Rule'

查看:273
本文介绍了AWS:使用“生命周期规则"在30天之内永久删除S3对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以在S3生命周期上进行配置以删除少于30天的对象(例如我想在5天之内永久删除而不转移到冰川等任何其他存储类?还是我应该选择其他替代品,例如Lambda?

我相信,S3生命周期规则"仅允许存储类超过30天.

解决方案

您可以使用

关于存储类别.您仍然可以删除对象,但需要支付30天,90天或180天的费用, 解决方案

You can use expiration action:

Define when objects expire. Amazon S3 deletes expired objects on your behalf.

You can set expiration time to 5 days or 1 day, or what suits you. For example, for a version bucket you can delete both current and previous versions after 5 days as shown on the screenshot:

Regarding the storage classes. You can still delete the objects, but you will be charged for 30, 90 or 180 days, depending on the storage class, if not deleting from the Standard class:

If you create an S3 Lifecycle expiration rule that causes objects that have been in S3 Intelligent-Tiering, S3 Standard-IA, or S3 One Zone-IA storage for less than 30 days to expire, you are charged for 30 days. If you create a Lifecycle expiration rule that causes objects that have been in S3 Glacier storage for less than 90 days to expire, you are charged for 90 days. If you create a Lifecycle expiration rule that causes objects that have been in S3 Glacier Deep Archive storage for less than 180 days to expire, you are charged for 180 days.

这篇关于AWS:使用“生命周期规则"在30天之内永久删除S3对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆