I want to use the AWS S3 cli to copy a full directory structure to an S3 bucket.
So far, everything I've tried copies the files to the bucket, but the directory structure is collapsed. (to say it another way, each file is copied into the root directory of the bucket)
The command I use is:
aws s3 cp --recursive ./logdata/ s3://bucketname/ I've also tried leaving off the trailing slash on my source designation (ie, the copy from argument). I've also used a wildcard to designate all files ... each thing I try simply copies the log files into the root directory of the bucket.
aws s3 cp --recursive mylocalsrcdir s3://bucket/then it will simply put the files in your local repository in the bucket "root directory" If you doaws s3 cp --recursive mydirectory s3://bucket/mydirectorythen it will recreate the directory structure on the target end.