How to delete all files from S3 Bucket by using command line

It is not obvious how to delete all files (including sub-folders) if you read AWS CLI S3 documentation. But there is a trick by using AWS S3 sync command cd ANY_EMPTY_FOLDER_ON_YOU_COMPUTER aws s3 sync . s3://YOUR-BUCKET-NAME –delete Be careful! This effectively will empty your AWS S3 Bucket completely. You can do the same for nestedContinue reading “How to delete all files from S3 Bucket by using command line”