I want to upload 20 million images to S3 bucket. I am using the following code.
s3.putObject(objectParams, (err, data) => {
if (err) {
reject(err);
} else {
resolve(data);
}
I have cloudinary image URLs that I am using and I want to upload those images to S3.
What is the fastest way to do that? I am currently running this code sequentially but it's gonna take a lot of time. Can I run it faster using rest api?
Can anyone please help?
Personally, I would do the following:
This will start many Lambda functions in parallel (the default limit is 1000 concurrent functions), which will all be copying the files for you.
The only problem would be if the files are over 512MB, which is the size of temporary storage provided by Lambda.