Can't delete s3 Bucket with locking enabled

0

I created a Terraform-managed s3 bucket with DynamoDB locking enabled and while trying to delete it as a root or admin user I get an error:

Enter image description here

Furthermore, I do not have access to Terraform anymore, so I have to use AWS Console or CLI.

preguntada hace un año309 visualizaciones
1 Respuesta
1

No sure what is it you are looking for, If you are using AWS console and have permission to bypass object lock "s3:BypassGovernanceRetention" it should work automatically. if you are looking for cli option you can check the options here

and example command to delete all the object version with locks overwrite should look like this:

aws s3api delete-objects --bucket BUCKET_NAME --bypass-governance-retention --delete "$(aws s3api list-object-versions --bucket BUCKET_NAME --output=json --query='{Objects: Versions[].{Key:Key,VersionId:VersionId}}')"

respondido hace un año

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