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?

preguntada hace 5 años336 visualizaciones
4 Respuestas
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.

respondido hace 5 años
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?

respondido hace 5 años
0

Correct.

respondido hace 5 años
0

Thank you!

respondido hace 5 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas