Skip to content

S3 bucket size unexpectedly large – possible noncurrent versions issue

0

Hi there, I’m having an issue with my Amazon S3 bucket. Even though my bucket’s total size should be around 206 GB, the metrics show that I have about 656 GB on standard storage and 504 GB on Glacier storage, which is much more than expected. I’ve already disabled versioning on the bucket and set up a lifecycle rule to delete noncurrent versions after two days. However, when I generate an inventory report, it still shows a large amount of noncurrent data that I can’t seem to get rid of. Could you advise on the best way to ensure these noncurrent versions are actually deleted or if there’s something I might be missing in the configuration? Thanks for your help!

asked a year ago165 views

4 Answers
0

Can you please share more details on the current Lifecycle Policy?

I would recommend referring to below AWS Storage Blog, which explains the current Lifecycle configurations required to reduce storage costs for non-current versions. [+] Reduce storage costs with fewer noncurrent versions using Amazon S3 Lifecycle: https://aws.amazon.com/blogs/storage/reduce-storage-costs-with-fewer-noncurrent-versions-using-amazon-s3-lifecycle/

AWS
EXPERT

answered a year ago

0

Thank you for sharing.

Looking at the Rule, you have overlapping Lifecycle configurations for non-current versions. Please Note: When you have multiple rules in an S3 Lifecycle configuration, an object can become eligible for multiple S3 Lifecycle actions on the same day. In such cases, Amazon S3 follows these general rules: Permanent deletion takes precedence over transition. Transition takes precedence over creation of delete markers. When an object is eligible for both an S3 Glacier Flexible Retrieval and an S3 Standard-IA (or an S3 One Zone-IA) transition, Amazon S3 chooses the S3 Glacier Flexible Retrieval transition. [+] https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-conflicts.html

From my observation:

  1. Why are you moving the non-current versions to Glacier Flexible Retrieval.? The minimum storage duration for objects in S3 Glacier Flexible Retrieval storage class is 90 days. [+] https://docs.aws.amazon.com/AmazonS3/latest/userguide/glacier-storage-classes.html#GFR

If you are looking to clean up all non-current versioned objects, then my suggestion will be to create a Lifecycle rule only for Non-current versions actions. Enter image description here

Also, create a dedicated Rule for Delete expired object delete markers or incomplete multipart uploads, this way you are not overlapping multiple actions in a single rule.

AWS
EXPERT

answered a year ago

0

Thanks. This happened only because I had previously 90 days for Glacier storage, but because noncurrent versions started to stack up, I change it temporarily to 1 day, because i want to get rid of noncurrent versions. I changed it as you advised now. I also created separate rule for deleting expires/incomplete multipart uploads. I think this together with limiting number of noncurrent versions to 0, which I changed previously, will solve my problem. Thanks for help.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.