Deny deleted Glacier class storage files

0

Hello,

I have some S3 bucket that has a lifecycle, after 30 days they change the storage class to Glacier. Once they are in Glacier, I need to prevent them from being accidentally deleted by specific users, that is, only one user group (group A) could delete and another group not (group B).

I was trying some policies: I can prevent group B from deleting files:

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Deny",
"Action": [
"s3: DeleteObject"
],
"Resource": "arn: aws: s3 ::: XXXXXXXXXXXXXXX / *"
}
]
}

With this policy, they cannot delete any files regardless of what type of storage the data are in. I want to prevent them from deleting when lifecycle changes to GLACIER, but when storage is STANDARD, I want to allow users to delete.

How can I make a user group allowed to delete or not according to the type of storage?

질문됨 5년 전336회 조회
4개 답변
0

AWS only supports policies (such as Group A can delete and Group B cannot delete) at the Glacier Vault level. And, unfortunately, S3 Lifecycle policies do not have access to the Glacier Vault.

답변함 5년 전
0

Thanks for your reply rtakeshi.

So, I cannot apply a policy according to the storage class, I can only apply the policy to allow or deny the deletion of files. I am right?

답변함 5년 전
0

Correct.

답변함 5년 전
0

Thank you!

답변함 5년 전

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

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

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

관련 콘텐츠