Deleting a Bucket
You can delete an empty bucket that you created and that you no longer need.
Deleting a Bucket Using AWS CLI (s3api)
Before you begin:
|
To delete a bucket, use the delete-bucket command following this syntax:
$ aws s3api delete-bucket \
--profile YOUR_PROFILE \
--bucket BUCKET \
--endpoint https://oos.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
bucket
: The name of the bucket you want to delete. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The bucket is deleted.
Deleting a Bucket Using AWS CLI (s3)
Before you begin:
|
To delete a bucket, use the rb command following this syntax:
$ aws s3 rb s3://YOUR_BUCKET \
--profile YOUR_PROFILE \
--debug \
--force \
--endpoint https://oos.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
s3://YOUR_BUCKET
: The name of the bucket you want to delete. -
(optional)
debug
: When included, returns the detailed log of the operation. This is useful to analyze and troubleshoot issues you may be encountering. -
(optional)
force
: Deletes all objects contained within the bucket along with the bucket itself.The command fails if the bucket contains versioned objects. To delete versioned objects, see Removing-Objects-from-a-Bucket.adoc#_Removing_Objects_from_a_Bucket_Using_AWS_CLI_s3api.
-
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The bucket is deleted.
Deleting a Bucket Using s3cmd
Before you begin:
|
You can manage your object storage resources using s3cmd commands. For more information, see s3cmd. |
Related Page
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.