ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念 · 基于 CLF-C02

Lifecycle rules

The order, timing and filters of lifecycle rules decide how much you save and what you pay in fees.

本课尚未翻译,暂以英文显示。

你在云从业者中已学过

  • A rule moves objects to cheaper classes as they age.
  • A rule can also delete objects after a set time.
  • Rules apply to a whole bucket or to a part of it.
阅读云从业者课程
Standard
Standard-IA
Glacier Flexible
Deep Archive
Expire
Day 30Day 90Day 365Year 7
A typical aging path for logs.

A typical aging path for logs.

  • Transition

    What it does
    Moves objects to a colder class
    Example
    Standard-IA at 30 days
  • Expiration

    What it does
    Deletes current objects
    Example
    Delete after 7 years
  • Noncurrent versions

    What it does
    Deletes old versions
    Example
    Keep the newest 3
  • Abort uploads

    What it does
    Removes unfinished upload parts
    Example
    After 7 days
The four things a rule can do.

1 / 2

  • Transition

    What it does
    Moves objects to a colder class
    Example
    Standard-IA at 30 days
  • Expiration

    What it does
    Deletes current objects
    Example
    Delete after 7 years
  • Noncurrent versions

    What it does
    Deletes old versions
    Example
    Keep the newest 3

2 / 2

  • Abort uploads

    What it does
    Removes unfinished upload parts
    Example
    After 7 days
The four things a rule can do.

是什么

Objects move down a waterfall, from warmer to colder classes. They never move back up by a rule. Standard to Standard-IA or One Zone-IA needs at least 30 days after creation. A rule cannot move an object to Standard-IA or One Zone-IA until it is 30 days old. For other early moves, S3 allows it, but you still pay for the rest of the minimum period.

Objects under 128 KB are not moved by default, because every transition is a billed request and the saving is tiny. Add an object size filter if you want them moved.

是什么

Expiration deletes current objects. In a versioned bucket it adds a delete marker, so you also need a rule for noncurrent versions: delete them after a number of days, or keep only the newest few. Add a rule that aborts incomplete multipart uploads, because their parts bill until removed. Filter any rule by prefix, tags or size.

要记住

  • Standard to Standard-IA or One Zone-IA: at least 30 days after creation.
  • Leaving a class before its minimum period still bills the rest of it.
  • Each transition is a billed request. Skip tiny objects.
  • Versioned bucket: add a noncurrent version rule or old versions keep billing.

要记住

  • Abort incomplete multipart uploads, for example after 7 days.
  • Scope rules by prefix, tag or size, so logs and media follow different paths.

考试中

  • “Logs are read for a month, kept for seven years, cost matters” points to a lifecycle rule that archives and later expires them.
  • “Storage keeps growing in a versioned bucket” points to a noncurrent version expiration rule.
  • “Failed large uploads still cost money” points to a rule that aborts incomplete multipart uploads.