文件夹的 Amazon S3 生命周期规则 [英] Amazon S3 life cycle rule for folder

查看:22
本文介绍了文件夹的 Amazon S3 生命周期规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用 Amazon S3 来存储一些由客户上传的文件.我想设置一个规则,自动监视特定文件夹的内容,特别是 - 删除一个月前创建的文件.这可能吗?

My application uses Amazon S3 to store some files, uploaded by customer. I want to set a rule that automatically should watch for particular folder's content, specifically - to delete files, that were created month ago. Is that possible?

推荐答案

你可以设置一个规则来自动监视特定文件夹的内容,特别是 - 删除一个月前创建的文件.

Yes you can set a rule that automatically should watch for particular folder's content, specifically - to delete files, that were created month ago.

为此,请转到生命周期策略"->到期".在到期"部分,将前缀设置为要应用规则的文件的路径.

例如:如果我想将规则应用于存储桶myBucket"中文件夹myFolder"中的fileA.txt".然后我应该将前缀设置为myFolder/".

For example: If I want to apply rule to 'fileA.txt' in folder 'myFolder' in bucket 'myBucket'. Then I should set prefix as 'myFolder/'.

Amazon S3 具有扁平结构,没有您在典型文件系统中看到的层次结构.但是,为了组织简单起见,Amazon S3 控制台支持将文件夹概念作为对对象进行分组的一种方式.Amazon S3 通过为对象使用键名前缀来实现这一点.

Amazon S3 has a flat structure with no hierarchy like you would see in a typical file system. However, for the sake of organizational simplicity, the Amazon S3 console supports the folder concept as a means of grouping objects. Amazon S3 does this by using key name prefixes for objects.

有关更多信息,请参阅:http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html

For more info refer: http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html

这篇关于文件夹的 Amazon S3 生命周期规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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