Will aws s3 sync s3://myBucket/this_folder/object_file C:\UsersDesktop
create also the "this_folder" in C:UsersDesktop? If not, what would be the solution to copy/sync including the folder structure of S3? I mean I have many files in different S3 bucket folders sorted by year, month, day. I would like to copy them locally with the folder structure/tree to be created locally as it is in the S3 bucket. Thank you.
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
Use the
aws cli
with the--recursive
argument.For example:
Yes, it will.
aws s3 sync
is recursive by default.You may want to consider adding the
--delete
option to make sure that the local directoryC:UsersDesktop
does not have deprecated files that are no longer in the bucket.