Question about Object Lock

0

I was reading https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-overview.html

It says "In governance mode, users can't overwrite or delete an object version..." - I am not sure what it means by "overwriting an object version" My understanding is that, for a versioned bucket, a new version is always created when uploading with the same name. So, is this referring to the case of unversioned buckets?

Thanks.

jacob
질문됨 2년 전546회 조회
1개 답변
0

Hello

When you create a bucket with Object Lock enabled, Amazon S3 automatically enables versioning for the bucket. Object Lock works only in versioned buckets, and retention periods and legal holds apply to individual object versions. When you lock an object version, Amazon S3 stores the lock information in the metadata for that object version. Placing a retention period or legal hold on an object protects only the version specified in the request. It doesn't prevent new versions of the object from being created.

If you put an object into a bucket that has the same key name as an existing protected object, Amazon S3 creates a new version of that object, stores it in the bucket as requested, and reports the request as completed successfully. The existing protected version of the object remains locked according to its retention configuration. You can refer following link for more: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html

AWS
답변함 2년 전
  • Thanks. I was confused by the part "users can't overwrite.." - in my understanding, even without object lock, users can't overwrite an object version?

  • Hello

    Since the bucket have versioning turned on, when a user uploads the object with same key/overwrite an object, it results in creation of new object version and the old object is still stored as previous version. This allows you to restore the previous version. Hope that helps.

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

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

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

관련 콘텐츠