S3バケットが「Access Denied」エラーで削除も操作もできなくなった。

0

バケットポリシーの設定を色々テストしていたら
恐らく全ユーザor全SourceIPからの操作をDenyにしてしまったようで、
ManagementConsoleから操作できなくなってしまい困っています。

同じような過去のケースで
https://forums.aws.amazon.com/thread.jspa?messageID=314274
というを見つけましたが・・・

上記ケースにあるcloudberryはwindows版のみかつ15 day free trial…のようなので、
macでかつ無償で対応する方法はないでしょうか…?

ご存知の方がいましたらアドバイス頂ければと思います。

Edited by: tomy103 on Jan 15, 2018 5:23 PM

tomy103
asked 6 years ago456 views
5 Answers
0

うまくいくかどうか分かりませんが、CLI を利用してバケットポリシーを削除することができるかもしれません。

AWS Command Line Interface のインストール - AWS Command Line Interface
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/installing.html

delete-bucket-policy — AWS CLI 1.14.24 Command Reference
https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-bucket-policy.html

semnil
answered 6 years ago
0

ありがとうございます。

確認してみましたが残念ながら Management Consoleと同様に Access Denied になってしまいますね・・・。

# aws s3api delete-bucket-policy --bucket <bucketname>

An error occurred (AccessDenied) when calling the DeleteBucketPolicy operation: Access Denied

Edited by: tomy103 on Jan 16, 2018 2:33 AM

tomy103
answered 6 years ago
0

操作を実施された際に使用したのは root アカウントのアクセスキーでしょうか。
以下のページの記載を見て、もしかしたら root アカウントならと思いました。

Regain Access to S3 Bucket
https://aws.amazon.com/jp/premiumsupport/knowledge-center/s3-regain-access/

semnil
answered 6 years ago
0

昨日は rootアカウントではなくS3FullAccess可能なIAMユーザで確認していました。

教えていただいた情報を試したところ、rootアカウントでバケットポリシー削除できました!

本当に助かりました。ありがとうございました!

Edited by: tomy103 on Jan 16, 2018 10:51 PM

tomy103
answered 6 years ago
0

thx all!

tomy103
answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions