ladderlore
လမ်းညွှန် တောင်းဆိုရန်
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

သဘောတရား

Lifecycle policies

Rules that move data to cheaper storage as it ages, and delete it when it is no longer needed.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

Day 0
Day 30
Day 90
Day 365
S3 Standard
S3 Standard-IA
S3 Glacier
Deleted
  1. 1After 30 days, the rule moves the object to S3 Standard-IA.
  2. 2After 90 days, it moves the object to S3 Glacier Flexible Retrieval, an archive class.
  3. 3After 365 days, an expiration action deletes it.
One lifecycle rule moves an object to colder storage as it ages, then deletes it.

အဆင့်ဆင့်

  1. 1After 30 days, the rule moves the object to S3 Standard-IA.
  2. 2After 90 days, it moves the object to S3 Glacier Flexible Retrieval, an archive class.
  3. 3After 365 days, an expiration action deletes it.

One lifecycle rule moves an object to colder storage as it ages, then deletes it.

  • Application logs

    Lifecycle rule
    Delete after 90 days
    Why
    Old logs are hardly ever read, so stop paying to keep them
  • Shared documents

    Lifecycle rule
    Move to S3 Standard-IA after 30 days, then to an S3 Glacier class after a year
    Why
    Opened often at first, then hardly ever
  • Records kept for compliance

    Lifecycle rule
    Move to S3 Glacier Deep Archive after 30 days, and delete after 7 years
    Why
    Kept only because rules require it, and almost never read
  • Old versions of objects

    Lifecycle rule
    Delete them 30 days after a newer version replaces them
    Why
    Versioning protects against mistakes, but old versions add up
Common uses for lifecycle rules.

1 / 2

  • Application logs

    Lifecycle rule
    Delete after 90 days
    Why
    Old logs are hardly ever read, so stop paying to keep them
  • Shared documents

    Lifecycle rule
    Move to S3 Standard-IA after 30 days, then to an S3 Glacier class after a year
    Why
    Opened often at first, then hardly ever

2 / 2

  • Records kept for compliance

    Lifecycle rule
    Move to S3 Glacier Deep Archive after 30 days, and delete after 7 years
    Why
    Kept only because rules require it, and almost never read
  • Old versions of objects

    Lifecycle rule
    Delete them 30 days after a newer version replaces them
    Why
    Versioning protects against mistakes, but old versions add up
Common uses for lifecycle rules.

ဘာလဲ

Most data is used a lot when it is new and rarely after that. A lifecycle policy makes storage follow that pattern automatically, so you stop paying the highest price for data nobody reads. In Amazon Simple Storage Service (Amazon S3), a lifecycle configuration is a set of rules on a bucket. Each rule covers all objects, or only those with a given prefix (folder), tag or size.

ဘာလဲ

A rule can take two kinds of action. A transition action moves objects to a cheaper storage class a set number of days after they were created. For example, a rule can move them to S3 Standard-IA after 30 days and to S3 Glacier Flexible Retrieval after 90. An expiration action deletes objects when they are no longer needed, such as logs after 90 days. Transitions run one way: a rule never moves an object back to S3 Standard.

ဘာလဲ

Other storage services use the same idea. Amazon Elastic File System (Amazon EFS) lifecycle management moves files that nobody has read for a while to cheaper storage classes. AWS Backup moves backups to cold storage and deletes them at the end of their retention period.

မှတ်ထားရန်

  • Transition: move objects to a cheaper storage class after a set number of days.
  • Expiration: delete objects, or old versions of objects, after a set time.
  • S3 rules work on age, not on use. If use is unpredictable, S3 Intelligent-Tiering moves objects based on real access instead.
  • Rules apply to objects already in the bucket as well as to new ones.

မှတ်ထားရန်

  • Objects keep their keys and stay in the same bucket. In S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive, they need a restore before you can read them.

စာမေးပွဲမှာ

  • “Move objects to cheaper storage automatically after 30 days, and archive them after a year” points to an S3 Lifecycle policy.
  • “Delete log files automatically after 90 days” points to a lifecycle expiration action.
  • “Access patterns are unknown, so rules based on age will not fit” points to S3 Intelligent-Tiering instead.