Empty and Delete a Bucket
A 3-step recipe with Amazon S3. We can help you get access.
Recipe · 3 steps
Empty and Delete a Bucket
with Amazon S3 · IT Infrastructure Management
List, batch-delete objects, then delete the empty bucket.
- List the bucket contents to see what must be removed before the bucket can be deleted.
- Delete the supplied keys in a single DeleteObjects request to empty the bucket.
- Delete the now-empty bucket. S3 responds with 204 No Content on success.
What you'll need to have ready
- bucket: The bucket to empty and delete.
- objectsToDelete: The list of objects to delete, each an object with a Key.
For your developer
Arazzo workflow amazon-s3:empty-and-delete-bucket, 3 operations: ListObjectsV2 → DeleteObjects → DeleteBucket. Specs on APIs.io.