How do I delete Amazon S3 objects and buckets?

2 minute read
0

I have Amazon Simple Storage Service (Amazon S3) objects and buckets that I don't need and want to delete.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

To delete individual S3 objects, you can use the Amazon S3 console, the AWS CLI, or an AWS SDK.

To use a single HTTP request to delete multiple S3 objects, you can use the AWS CLI or an AWS SDK.

To empty an S3 bucket of its objects, you can use the Amazon S3 console, AWS CLI, lifecycle configuration rule, or AWS SDK.

To delete an S3 bucket and all the objects that it contains, you can use the Amazon S3 console, AWS CLI, or AWS SDK.

Important: The procedure permanently deletes any data in your S3 bucket. Data deleted and removed from a bucket can't be recovered. Before you proceed, review all the objects and data in the bucket to make sure that they are no longer needed.

Related information

Buckets overview

Amazon S3 objects overview

AWS OFFICIAL
AWS OFFICIALUpdated 4 months ago