I need to download the directory tree of a folder in a bucket recursively, with the caveat of not downloading any of the files themselves (they are large). This is what I have so far:
s3cmd --dry-run --recursive --no-delete-removed --verbose --rinclude='^[^.]*$' --rexclude='[^.]*$' sync s3://bucket_name/folder/ ~/Downloads/local_folder/ which correctly skips the files, but it isn't downloading the folders.
Here are some related questions I found
/delimiters in the key names... s3cmd may not have a simple way of downloading things that don't actually exist. A direct API call to the REST interface for ListObjects allows you to fetch "common prefixes" -- the "folders" -- but whether s3cmd leverages this in a useful way is unknown to me, fwiw.