What is the difference between:
aws s3 sync s3://mybucket/ s3://mybucket2/
aws s3 mv s3://mybucket/ s3://mybucket2/ --recursive
When would I use which?
If we move new docs to AWS what is now on s3?
aws s3 sync
copies any files that have changed on the source location, it does NOT delete anything on the target location.
aws s3 sync --delete
copies files changed in the source location, and DELETES files from the target location that have been removed from source.
aws s3 cp
copies all files from source to target, regardless of them changing in the source, does not delete anything on the target.
aws s3 mv
moves changed files from source to target, and DELETES the respective files in the source location.
For more information, AWS has documentation on the High Level Use of the S3 CLI, and the more detailed CLI Reference documentation.