I'd like to be able to upload a large number of tiny files to amazon s3 bucket using aws CLI with something like this command: $ time aws s3 cp --recursive --quiet big18v1Pngs https://big18v1.s3.amazonaws.com/
I got the command from this page: https://aws.amazon.com/blogs/apn/getting-the-most-out-of-the-amazon-s3-cli/
I think what I'm struggling with is getting my bucket url? in the command line when I enter that command I get "error: invalid argument type". I've attached a picture of my bucket page
The syntax for the AWS Command-Line Interface (CLI) S3 copy command is:
aws s3 cp local-filename.txt s3://bucket-name/filename.txt
There is no need to use time
-- that was in the article you referenced to output the time that the command took to execute, which is not necessary for your use-case.
See the aws s3 cp
documentation.
You might also consider using the aws s3 sync
command that can replicate files and subdirectories, while only copying new/changed files. You could run this on a regular basis to duplicate files to Amazon S3.
aws s3 sync directory-name s3://bucket-name/path
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With