awscli s3 sync wildcards
Asked Answered
T

1

15

I'm trying to sync all files in a directory that start with "model.ckpt" to an S3 bucket path, by trying this:

aws s3 sync ./model.ckpt* $S3_CKPT_PATH

But I'm getting the error:

Unknown options: ./model.ckpt-0.meta,<my S3_CKPT_PATH path>

However, aws s3 sync . $S3_CKPT_PATH works, but gives me a lot of additional files I don't want.

Anybody know how I can do this?

Traverse answered 10/4, 2019 at 0:45 Comment(0)
C
42

When using aws s3 sync, all files in a folder are included.

If you wish to specify wildcards, you will need to Use Exclude and Include Filters.

For example:

aws s3 sync mydir s3://bucket/folder/ --exclude "*" --include "model.ckpt*"
Colugo answered 10/4, 2019 at 3:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.