I'm moving from s3cmd
tool to the official aws
CLI tool distributed by Amazon, and as I'm converting old scripts, I'm curious about how to construct this equivalent command:
s3cmd --delete-removed sync s3://$BUCKET $LOCAL_DIR/
From the s3cmd
documentation, I see that --delete-removed
is defined as: Delete remote objects with no corresponding local file
.
However, which is considered the remote and which is considered the local here? I am worried that the aws s3 sync
command with the --delete
flag will not be render the same results.
Are
s3cmd --delete-removed sync s3://$BUCKET $LOCAL_DIR/
and
aws s3 sync s3://$BUCKET $LOCAL_DIR/ --delete
the same commands?
Thank you for your help in untangling my confusion!