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.

gefragt vor einem Jahr309 Aufrufe
1 Antwort
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}}')"

beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen