spcsLrg
spcsLrg

Reputation: 376

AWS CLI "delete-folder" command help needed

I have a bucket with folder s3://mybucket/abc/thisFolder which contains thousands of files inside.

I can use aws s3 rm s3://mybucket/abc/thisFolder --recursive to delete it and all files inside, and it does it fine one by one.

However, there's also a delete-folder command, but to me the official doc is not very clear. Its example says aws workdocs delete-folder --folder-id 26fa8aa4ba2071447c194f7b150b07149dbdb9e1c8a301872dcd93a4735ce65d

I would like to know what is workdocs in example above, and how do I obtain the long --folder-id string for my folder s3://mybucket/abc/thisFolder?

Thank you.

Upvotes: 0

Views: 2263

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269320

Amazon WorkDocs is a Dropbox-like service.

If you wish to delete objects in Amazon S3, then you should only use AWS CLI commands that start with aws s3 or aws s3api.

Another way to delete folders in Amazon S3 is to configure Amazon S3 Object lifecycle management with a rule to delete objects with a given prefix. They might take a while to delete (~24 hours), but it will happen automatically rather than one-by-one.

Upvotes: 3

Related Questions