1回答
- 新しい順
- 投票が多い順
- コメントが多い順
0
Hi,
You'll see examples of lifecycle rules on this page: https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html like this one
<LifecycleConfiguration>
<Rule>
<ID>Transition and Expiration Rule</ID>
<Filter>
<Prefix>tax/</Prefix>
</Filter>
<Status>Enabled</Status>
<Transition>
<Days>365</Days>
<StorageClass>S3 Glacier Flexible Retrieval</StorageClass>
</Transition>
<Expiration>
<Days>3650</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>
The rules are heavily based on prefix. So, I would suggest a slight change in your directory structure:
/keep100/[data to keep for 100 days structure]
/keep365/[data to keep for 100 days structure]
Then you can easily apply the <Expiration> xml node that you need in a lifecycle applied to the distinct prefixes.
Best
Didier
関連するコンテンツ
- AWS公式更新しました 2年前
Thank you. I was looking for a way to dynamically tag files located in prefixes using text contained in the prefix name. There will be hundreds of prefixes with files that need to be tagged. Yes I could rearrange the directory structure to make things a bit more simple but wanted to exhaust what can be done with the current file structure.