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.

質問済み 1年前309ビュー
1回答
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}}')"

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ