-
I want to delete all the objects in a bucket, I would expect this would work:
This fails with: value: ServiceError { err: DeleteObjectsError { kind: Unhandled(Error { code: Some("MissingRequestBodyError"), message: Some("Request Body is empty") What should be in the request body? I was hoping to see an example in the example dir, but I couldn't find one, there is only an example of deleting a single object |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
From the docs, it seems like
Looking at other examples, it seems like the best option is to use https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
From the docs, it seems like
DeleteObjects
doesn't work like that:Looking at other examples, it seems like the best option is to use
list_objects()
first. There's an example in the docs that uses the Java SDK (pop open "Using the AWS SDK for Java")https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html