Is there any way to upload 50000 image files to Am

2019-09-20 18:44发布

问题:

Is there any way to upload 50000 image files to Amazon S3 Bucket. The 50000 image file URLs are saved in a .txt file. Can someone please tell me a better way to do this.

回答1:

It sounds like your requirement is: For each image URL listed in a text file, copy the images to an Amazon S3 bucket.

There is no in-built capability with Amazon S3 to do this. Instead, you would need to write an app that:

  • Reads the text file and, for each URL
  • Downloads the image
  • Uploads the image to Amazon S3

Doing this on an Amazon EC2 instance would be the fastest, due to low latency between S3 and EC2.

You could also get fancy and do it via Amazon EMR. It would be the fastest due to parallel processing, but would require knowledge of how to use Hadoop.

If you have a local copy of the images, you could order an AWS Snowball and use it to transfer the files to Amazon S3. However, it would probably be faster just to copy the files over the Internet (rough guess... at 1MB per file, total volume is 50GB).