Reputation: 11
I had 10 subfolders named like 1-10 in my s3 bucket, but in my ec2 instance I had only 3 subfolders named as 1,2,3. So I want to sync (or cp) with s3 bucket only for to get these 3 folders data without having all 10 folders in my ec2. Is there any possibility to do something like this?
aws s3 sync s3://mybucket/ . --include "*"
But i'm getting all 10 folders in my ec2 which are present in s3 bucket.
Upvotes: 0
Views: 78
Reputation: 3203
You can try below command which will first exclude everything and then will only include those folders which you actually want :
aws s3 sync s3://mybucket/ . --exclude "*" --include "1" --include "2" --include "3"
Upvotes: 1