We must configure the access key and secret key of the bucket by the command:
aws configure
To list all the buckets
aws --endpoint-url=https://123456789.r2.cloudflarestorage.com s3 ls
You can see that with each command we run it that always has --endpoint-url, it's so long for the command. You can define it using default --endpoint-url like this:
alias aws = aws -- endpoint-url=<you_url>
You can watch this video: Set default endpoint AWS CLI
To upload multiple files, folders
aws s3 cp SOURCE_DIR s3://DEST_BUCKET/ --recursive
If you want to upload all the folders, and files in the current path, you can replace SOURCE_DIR as dot (.)