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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ