skip to Main Content

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.

2

Answers


  1. 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/
    
    Login or Signup to reply.
  2. You might be using an old version of awscli. Try Updating it through:
    pip install awscli -U

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search