Reputation: 33
I've tried to copy my current folder to the bucket:
aws s3 cp path s3://bucket/NewFolder
but when I sync again using
aws s3 sync s3://bucket/NewFolder/ /home/test
all I get is an empty folder meaning that my folder was not copied in the first place.
Upvotes: 3
Views: 8888
Reputation: 408
Copy all content from the current folder, but not the folder itself:
For example, I am copying all the content from data folder which is located under NewFolder, with tgsbucket my bucket:
aws s3 cp data s3://tgsbucket --recursive
Copy the local folder:
Specify folder name after bucket name:
aws s3 cp data s3://tgsbucket/data --recursive
Upvotes: 8
Reputation: 270184
You can use this to copy a whole folder to S3:
aws s3 cp --recursive path s3://bucket/NewFolder
Or, sync the local folder to S3:
aws s3 sync path s3://bucket/NewFolder/
Upvotes: 7