Can you delete a bucket with object lock on it?

0

I created a bucket and applied lock on it, say Compliance lock. Can I delete the bucket?

Saurav
질문됨 한 달 전265회 조회
3개 답변
4

Hello. If you've applied a Compliance mode object lock to your S3 bucket, you can't delete it until the retention period for all objects expires. This is because Compliance mode locks objects completely, preventing any deletion until the specified time elapses. However, if you're using Governance mode, users might be able to delete objects before the retention period ends if they have the right permissions.

For more details, you can check out the AWS documentation on S3 Object Lock: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html

profile picture
답변함 한 달 전
2

Hello.

If there are no objects in the S3 bucket, you can delete an S3 bucket that has compliance mode object lock set.
However, if even one object from an old version remains in S3, the S3 bucket cannot be deleted.
The object lock is to prevent objects in the bucket from being deleted, so if the bucket is empty, it can be deleted normally.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html

S3 Object Lock can help prevent Amazon S3 objects from being deleted or overwritten for a fixed amount of time or indefinitely. Object Lock uses a write-once-read-many (WORM) model to store objects. You can use Object Lock to help meet regulatory requirements that require WORM storage, or to add another layer of protection against object changes or deletion.

profile picture
전문가
답변함 한 달 전
0

Hi

  • object lock depends on the specific mode of object lock enabled:*

**Compliance mode: **In this mode, objects are completely locked and cannot be deleted by any user, including the root account, until the retention period expires. There is no way to bypass this restriction.

Governance mode: Objects can't be deleted by users unless they have specific permissions:

s3:BypassGovernanceRetention permission: With this permission, users can delete objects before the retention period ends. x-amz-bypass-governance-retention:true header: Including this header in the DELETE request allows deletion before the retention period, but only for users with the necessary permissions.

profile picture
전문가
GK
답변함 한 달 전

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

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

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

관련 콘텐츠