S3 object lock on existing S3 objects?

0

Recently S3 launched a new feature around object lock where we can prevent individual objects from deletion from even the owner of the bucket for a specified period of time. This feature is only applicable for new objects uploaded. but what about the existing objects?

I have a lot of existing objects in my S3 bucket which I want to have object lock enabled on. What are the ways to achieve this?

AWS
전문가
질문됨 4년 전2017회 조회
3개 답변
2

To configure object lock on existing objects present in S3 bucket, below two steps are to be followed:

  1. The bucket should have object lock enabled. You can turn on Object Lock for an existing bucket from the "Properties" section of S3 bucket : https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-s3-enabling-object-lock-buckets/
  2. Then, perform S3 batch operation to set the retention period for your existing objects. For this, you may first create S3 inventory report (which will contain the list of all the objects) for your S3 bucket and then perform S3 batch operation for setting Object Lock retention to apply retention dates (in either Governance or Compliance mode) on your existing objects.

Reference for S3 Inventory

Reference for S3 Batch operations and retention modes

You can also follow the guidelines outlined in this blog below to use S3 batch operation to set the retention period for your existing objects after enabling object lock on your bucket:

[+] https://aws.amazon.com/blogs/storage/how-to-manage-retention-periods-in-bulk-using-amazon-s3-batch-operations/

Note: If you use Inventory and S3 batch operations, you will incur additional charges, refer pricing document for additional details.

Hope you find this useful.

Neha_29
답변함 9달 전
profile picture
전문가
검토됨 한 달 전
0
수락된 답변

Enabling S3 Object Lock

You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.

AWS
전문가
답변함 4년 전
profile picture
전문가
검토됨 한 달 전
-1

Enabling object locking on a bucket does not retroactively lock existing objects in the bucket. Object locking can only be applied to objects that are uploaded or copied to the bucket after object locking is enabled. If you want to apply object locking to existing objects in the bucket, you will need to make a copy of each object and then delete the original object. The copy of the object will have the object lock applied to it.

AWS
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인