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.
Note: This article applies to general purpose buckets and directory buckets only. It doesn't apply to table buckets or vector buckets. To view or edit the lifecycle configuration for directory buckets, use the AWS CLI, AWS SDKs, or the Amazon S3 REST API.
To delete individual S3 objects, you can use the Amazon S3 console, the delete-objects AWS CLI command, or an AWS SDK.
To use a single HTTP request to delete multiple S3 objects, you can use the delete-objects AWS CLI command 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. You can't recover data that you delete and remove from a bucket. Before you proceed, review all the objects and data in the bucket to make sure that you no longer need them.
Related information
General purpose buckets overview
Amazon S3 objects overview
How do I use a lifecycle configuration rule to empty an S3 bucket?
Working with S3 Lifecycle for directory buckets