Skip to content

Object lock is doubling the cost of archive storage

0

I have a bucket with object lock enabled and a long retention. This is to provide a good backup of important files. The files are zipped into 2 GB objects.

When I upload them to S3 and then moved them to deep archive, I seem to end up with the real object, an identical 2 GB object (from the move to Glacier) and a 1.2 GB object (possibly from the upload process). I have created a lifecycle rule to delete non-current versions, but I think this is impossible with object lock enabled.

How can I prevent the costs of this bucket being at least 100% too high?

screenshot

asked a year ago518 views
1 Answer
2
Accepted Answer

How did you move them to one of the Glacier classes? The only way to do that for an existing object is with a lifecycle rule that transitions the object (https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html). That's because objects in S3 are immutable.

If you use the management console or CLI seemingly to "move" the object to a different name or storage class, the existing and possibly locked object will not be changed, as no object ever can be. Instead, a new copy of the object will be created, and the old, locked object will remain as a previous version.

You'll need to use a lifecycle rule to transition the objects you want to the destination storage class.

If the inadvertently created copies aren't locked yet, you can delete them to return to the earlier situation with the locked objects in the original storage class. Then create a lifecycle rule to transition the original, locked objects to the target storage class.

EXPERT
answered a year ago
EXPERT
reviewed a year ago
EXPERT
reviewed a year ago
  • I think that this answer correctly explains my situation. I think that I moved classes manually before I set up a lifecycle rule, and I think that this has resulted in non-removable out of date versions.

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.