1

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.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Melinda
  • 1,501
  • 5
  • 25
  • 58

2 Answers2

3

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/
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
0

You might be using an old version of awscli. Try Updating it through:
pip install awscli -U

Amir nazary
  • 384
  • 1
  • 7