If I write:

& aws s3 rm s3://bucket-name/folder/ 

It does not delete, says that folder is not an object. If I write:

 & aws s3 rm s3://bucket-name/folder/ --recursive 

Then he deletes, and everything is fine, but what will happen if I write:

 & aws s3 rm s3://bucket-name/ 

I put this question, because I accidentally entered this command and then immediately pressed cancel. Did he delete some of my data in this gap or not?

  • And what is the problem to take and check if something is out there somewhere or not? - Regent
  • the fact of the matter is that there is a lot of information there, and I cannot verify. - Pavel

1 answer 1

from the documentation :


The following rm command recursively deletes all objects. In this example, the bucket mybucket contains the objects test1.txt and test2.txt:

 aws s3 rm s3://mybucket --recursive 

Output:

 delete: s3://mybucket/test1.txt delete: s3://mybucket/test2.txt 

keywords highlighted. those. Without the --recursive option, nothing will be deleted.

what else is important: the bucket itself will not be removed even with the option --recursive .