amazon-web-servicesamazon-s3

How do I sync AWS S3 files using file paths in include option


I have following directories structure in my S3 bucket, I want run multiple sync jobs in such a way that I could sync all folders that start with 1 in one job and those which start with 2 in another sync job.

I know I can sync using aws s3 sync s3://bucket my_local_dir for all individual sub-directories.

/Root

Thanks in Advance.


Solution

  • You can:

    This seems to work:

    aws s3 sync s3://my-bucket/ local_dir --exclude "*" --include "1*"