I created a s3 bucket using console, while configuration I removed the default selected user. Now when I am trying to delete the bucket using console it says access denied. I understand I should have removed the user. However when I click on bucket name in permission it show owner: myUserName and bucket policy: no How can I delete it? As I understand there is owner but there is no permission to owner as I removed it while configuration.
-
http://docs.aws.amazon.com/AmazonS3/latest/dev/delete-or-empty-bucket.html – Raf Aug 15 '17 at 13:40
-
Followed [this](http://docs.aws.amazon.com/AmazonS3/latest/user-guide/delete-bucket.html) still the same error. http://docs.aws.amazon.com/AmazonS3/latest/user-guide/delete-bucket.html – Aug 15 '17 at 13:56
6 Answers
You are not able to delete it because there is a deny effect on "s3:DeleteBucket" on all principals according to this thread
You can simply follow these steps -
- Login as root user. (Not as any IAM user you might have specified)
- Go to the S3 console.
- Click on the bucket you want to delete.
- Under the "Permissions" tab click on "Bucket Policy"
- Click on "Delete"
Now you will be able to delete the bucket.
Incidentally, before you click on delete if you take a close look at the last element of the "Statement" array, you'll see what was causing the problem.

- 878
- 1
- 6
- 9
-
8This answer wins for me. The accepted answer does not even mention the exact steps with respect to AWS console interface and so is hard to understand. – Noopur Phalak Sep 01 '20 at 13:03
-
1@NoopurPhalak Yes. The accepted answer got me scratching my head for quite a bit too. That's why I decided to post my own one. Glad it helped :) – jindan Sep 30 '20 at 08:29
-
3Well, this is by far the correct answer, simple and well explained. – danyPasillas Feb 24 '21 at 17:40
You can try this in 2 ways:
First(Recommended): Delete the bucket policy and delete the bucket.
Second: Follow these steps
- Create a new Bucket(Do not change anything, keep default).
- Go to S3 console where all buckets are listed.
- Select newly created bucket.
- Click on permissions.
- Copy the account id under owner access section.
- Go to permissions of old bucket.
- Add account using the copied account id.
- Now try deleting it.

- 2,798
- 3
- 28
- 49
Better to delete that particular element of the statement array than to point blank delete everything.

- 493
- 6
- 14
I could not delete S3 resource that was created by Elastic Beanstalk
- Bucket policy
- Deleting S3 again and it worked

- 4,757
- 1
- 32
- 23
I successfully deleted my bucket by changing the "Action": "Deny" to "Action": "Allow" under permission tag

- 179
- 1
- 3