Open aldy120 opened 4 years ago
有一些 storage class 有最小的存放時間,如果在這段時間內,使用 lifecycle expiration 刪掉的話,儲存費用還是照算到這段時間過完。
Storage Class | Minimum Storage Time |
---|---|
Standard-IA | 30 days |
Intelligent-Tiering | 30 days |
Onezone-IA | 30 days |
Glacier | 90 days |
Deep Archive | 180 days |
如果用 lifecycle 來 archive 的話,那請求的費用是根據 lifecycle rule 的數量來算還是 object 的數量來算?
object 的數量
If the current object version is the only object version and it is also a delete marker (also referred as an expired object delete marker, where all object versions are deleted and you only have a delete marker remaining), Amazon S3 removes the expired object delete marker. You can also use the expiration action to direct Amazon S3 to remove any expired object delete markers. For an example, see Example 7: Removing Expired Object Delete Markers.
https://aws.amazon.com/premiumsupport/knowledge-center/s3-lifecycle-rule-intelligent-tiering/
小於 128 KB 的檔案不會自動被 lifecycle rule 轉換到 IA 或是 Intelligent tier。
新的 lifecycle rule 首次執行預計會在 48 小時內。
如果要轉換的檔案很多,有幾百萬個。會分多天執行。
小於 128 KB 的檔案不會自動被 lifecycle rule 轉換到 IA 或是 Intelligent tier (Glacier Instant 也是)。
Objects smaller than 128 KB – For the following transitions, Amazon S3 does not transition objects that are smaller than 128 KB:
From the S3 Standard or S3 Standard-IA storage classes to S3 Intelligent-Tiering or S3 Glacier Instant Retrieval.
From the S3 Standard storage class to S3 Standard-IA or S3 One Zone-IA.
[] Transitioning objects using Amazon S3 Lifecycle - Constraints - https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html#lifecycle-configuration-constraints
某些情況下小於 128KB 的無法被 transition 。
Objects smaller than 128 KB – For the following transitions, Amazon S3 does not transition objects that are smaller than 128 KB:
From the S3 Standard or S3 Standard-IA storage classes to S3 Intelligent-Tiering or S3 Glacier Instant Retrieval.
From the S3 Standard storage class to S3 Standard-IA or S3 One Zone-IA.
無法建立未滿 30 天的 lifecycle transition 到 IA 系列 (Standard IA/Onezone IA)。
Before you transition objects from the S3 Standard or S3 Standard-IA storage classes to S3 Standard-IA or S3 One Zone-IA, you must store them at least 30 days in the S3 Standard storage class. For example, you cannot create a Lifecycle rule to transition objects to the S3 Standard-IA storage class one day after you create them. Amazon S3 doesn't transition objects within the first 30 days because newer objects are often accessed more frequently or deleted sooner than is suitable for S3 Standard-IA or S3 One Zone-IA storage.
IA 系列 (Standard IA/Onezone IA) 有 30 天低消。
The S3 Standard-IA and S3 One Zone-IA storage classes have a minimum 30-day storage charge. Therefore, you can't specify a single Lifecycle rule for both an S3 Standard-IA or S3 One Zone-IA transition and a S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive transition when the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive transition occurs less than 30 days after the S3 Standard-IA or S3 One Zone-IA transition.
The same 30-day minimum applies when you specify a transition from S3 Standard-IA storage to S3 One Zone-IA. You can specify two rules to accomplish this, but you pay minimum storage charges. For more information about cost considerations, see Amazon S3 pricing.
Glacier Flexible Retrieval and Deep Archive 需要額外的 8 + 32 KB 的空間。 8KB (Standard 計價)用來 list 32KB (原計價類別計價) 用來 restore
Glacier Flexible Retrieval and Deep Archive 有儲存費用低消 Flexible: 90 days Deep Archive: 180 days
轉到 Glacier Flexible/Deep Archive 的轉換費雖然是一次性的,但其實沒有很便宜。
Restore 會生一份 Reduced Redundancy Storage 級別的暫存,是要收儲存費的。
delay 原則上收費是依照 lifecycle 定的來算,不會多扣錢。舉例來說延遲刪除不會多收 storage 費用。
但有例外。
The one exception to this behavior is if you have a lifecycle rule to transition to the S3 Intelligent-Tiering storage class. In that case, billing changes do not occur until the object has transitioned to S3 Intelligent-Tiering. https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html
已經存在的舊的 object 也會受到 lifecycle rule 影響。
Existing and new objects
When you add a Lifecycle configuration to a bucket, the configuration rules apply to both existing objects and objects that you add later. For example, if you add a Lifecycle configuration rule today with an expiration action that causes objects with a specific prefix to expire 30 days after creation, Amazon S3 will queue for removal any existing objects that are more than 30 days old.
似乎只有 expiration 有時間,但 transition 沒有辦法用 head-object 取得到期時間。
lifecycle 可以設定進去 IA (Infrequent Access) 跟出來的條件。進去的條件通常是一段時間沒有存取 (此時間是 EFS 內部自行計算,不會在檔案的 metadata )。
從 IA 出來的條件可以選擇被存取的自動出來,或是不要出來。
小於 128 KB 不會進入 IA 。
https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html
lifecycle 要付請求費,相當於轉換額外付錢
使用情境
轉換成 IA or Onezone-IA 最少要設定 30 天以後
(https://docs.aws.amazon.com/en_us/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html#lifecycle-general-considerations-transition-sc)
看不太懂
S3 的 Glacier 跟 Deep Archive 只能從 S3 介面看到
Glacier 介面看不到。
加密不會變
transition 不會改變 S3 上的加密方式。
Glacier/Deep Archive 相關
Glacier 跟 Deep Archive 的 object 無法及時存取。需要申請解凍。解凍指的是會幫你暫時複製一份物件到 Standard 以供讀取。你可以趁這個機會複製一份到 standard class 。
轉成 Glacier 額外檔案變大了
每次放到 Glacier/Deep Archive 都需要額外的一筆錢
解凍的時會會同時支付 Glacier/Deep Archive 儲存費用,和一份解凍的 Reduced Redundancy 的費用