Reputation: 1531
I am working on an Ubuntu 22.04 desktop using AWS CLI. I am trying to upload ALL files located in a specific local directory to our S3 bucket using AWS CLI but I'm getting an error. Here is my command and the error:
ms@ms01:~$ aws s3 cp /home/ms/Downloads/TWU/mp3/ s3://abc.org/v2/ –-recursive
The error I'm getting is: Unknown options: --recursive
Any help/direction would be appreciated. Thanks.
Upvotes: 1
Views: 2092
Reputation: 695
You might be using an old version of awscli
. Try Updating it through:
pip install awscli -U
Upvotes: 0
Reputation: 269101
Try putting --recursive
earlier in the command:
aws s3 cp --recursive /home/ms/Downloads/TWU/mp3/ s3://abc.org/v2/
Alternatively, the sync
command always includes all sub-directories and only copies files that are not already in the destination (so it can be run multiple times to only copy new/changed files):
aws s3 sync /home/ms/Downloads/TWU/mp3/ s3://abc.org/v2/
Upvotes: 3