Delete an S3 bucket using Commandeer

  • S3
  • Commandeer
  • Infrastructure
  • Bucket
  • Aws
  • Localstack
About 1 min

# Delete an S3 bucket using Commandeer

# What you’ll learn

This tutorial goes over deleting your S3 bucket. You’ll be able to do it in LocalStack or in a real AWS account using Commandeer. The same method works for deleting an empty bucket as well as for deleting a bucket with some content inside.

# Prerequisites

# Choose Local or AWS

Commandeer comes with full support for LocalStack. You can start/stop LocalStack directly from Commandeer. If you would like to operate on LocalStack S3, just switch your account to Local. Otherwise, just select an AWS account of your choice.

# Create Some Buckets

Let’s create some buckets and we can have some fun deleting them right after. The easiest way to create some buckets is by using the Commandeer user interface. Just follow our earlier tutorial to create some buckets using Commandeer. You can || create an S3 bucket using Ansible also which requires a little more setup. If you wish, you can also add some content to it with Commandeer or Ansible.

# Delete Your Buckets

Alright, now that our buckets are created, let’s nuke them. Navigate to the bucket you would like to delete and click the delete button. Deleting a bucket is a destructive operation so Commandeer will prompt you with a confirmation dialog. Clicking no will get you back to the bucket detail page. Let’s click yes and delete our bucket. Then, the bucket is deleted and we can move on to deleting the next one by just repeating the same steps.

Please note that deleting a bucket also deletes all of its contents. Meaning that if you had any files and folders inside the bucket, all of them will be deleted once you confirm the deletion. With big power comes big responsibility 😃

Deleting a bucket in Commandeer

Confirming deleting a bucket

# Recap

Commandeer UI gives us the ability to create and delete our buckets quickly. It’s a very useful tool to use when we want to delete some small number of buckets. If you would like to delete your buckets in bulk in an automated fashion, you can do so with Ansible.

Last update: July 26, 2020 22:45