Tuesday, October 20, 2015

Force Delete a Bucket in AWS S3

Having a hard time deleting a bucket in S3 in your AWS Web console

Its possible it contains over 100,000 objects.

Then you must use the AWS CLI  Command Line interface

The AWS CLI intergrates into your existing CMD line shell.

Start Run>CMD  right click and run as administrator

Type >aws configure  you should get an access key prompt like below. That confirms that CLI has been installed correctly.

Make sure you have access to your ACCESS KEY and SECRET KEY for your credentials




us-east-1
us-west-1
us-west-2

Theses regions are the common regions for US data repositories. Pick your correct region or you will not delete the bucket.  In your S3 web console, you might see US Standard region when clicking on bucket properties. Under STATIC WEB SITE HOSTING Heading, drop this down and you should see the link to the bucket also know as the ENDPOINT. In this link is your region.



FORCE DELETE A BUCKET COMMAND: 
$ aws s3 rb s3://bucket-name --force

Replace the red text with the exact spelling of your bucket needing brute force deletion


No comments: