简体   繁体   中英

What is my amazon s3 bucket url? How do I upload many many files to s3 bucket?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM