The question was originally posted on Super User (https://superuser.com/questions/1768933/aws-sync-doesnt-download-the-file-and-instead-create-an-empty-directory), but with no answers. I thought stack overflow, although not officially designed for this type of question, could really help given the huge amount of experts here.
The file I’m trying to download is:
s3://ont-open-data/gm24385_q20_2021.10/analysis/20210805_1713_5C_PAH79257_0e41e938/guppy_5.0.15_sup/align_unfiltered/chr19/calls2ref.bam
This is an open dataset. I followed the tutorial here: https://labs.epi2me.io/tutorials/.
The command I used was:
aws s3 sync --no-sign-request s3://ont-open-data/gm24385_q20_2021.10/analysis/20210805_1713_5C_PAH79257_0e41e938/guppy_5.0.15_sup/align_unfiltered/chr19/calls2ref.bam destination.bam
However, instead of downloading the file, aws simply created an empty directory named destination.bam
, which makes no sense…
$ aws --version
aws-cli/1.15.15 Python/3.6.10 Linux/4.4.0-210-generic botocore/1.10.15
2
Answers
Couldn't solve the problem with
sync
, but I realized thatcp
works! The following command downloaded the file:Your issue is caused by the fact that
calls2ref.bam
is not a directory.If you list the
chr19/
directory, it returns:The
cp
command works because you have provided the full Key of an object that you wish to copy. Thesync
command, however, expects to receive a directory and it will copy the entire contents of the directory including sub-directories.