skip to Main Content

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


  1. Chosen as BEST ANSWER

    Couldn't solve the problem with sync, but I realized that cp works! The following command downloaded the file:

    aws s3 cp --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
    

  2. Your issue is caused by the fact that calls2ref.bam is not a directory.

    If you list the chr19/ directory, it returns:

    2021-10-07 00:57:41        228 basecall_stats.log
    2021-10-07 00:57:42 1033176198 calls2ref.bam
    2021-10-07 00:58:33     507904 calls2ref.bam.bai
    2021-10-07 00:58:33   15443858 calls2ref_stats.txt
    2021-10-07 00:58:35          0 extract_region_from_bam.log
    

    The cp command works because you have provided the full Key of an object that you wish to copy. The sync command, however, expects to receive a directory and it will copy the entire contents of the directory including sub-directories.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search