I am trying to refactor my current existing code base to download multiple files from S3. If I understand correctly the documentation, I am doing too many requests in a short period of time (1), (2) & (3).
Looking at the AWS SDK documentation it appears that a proper implementation exists, as described at:
However I have been unable to use it so far. I did check the example page:
See "Upload or download large files" at:
It looks like AmazonS3Client does not accept pre-signed URL as input (output only). Same story for TransferUtility
Anyone knows how to use AWS SDK (or c# alternative) to properly download multiple files from S3 using pre-signed URLs ? I have a reproducable case where a basic HTTP client setup fails for number of files equals 7000.
References:
2
Answers
you can clone your s3 bucket on your local directory which will automatically download your videos
Yes, while working with a larger number of files such as 7000 using pre-signed URLs with AWS SDK is not the most suitable approach.
You can use
HttpClient
withExponential Backoff
. But before that, you will be required to list all the pre-signed URLs for each file you want to download.HttpClient
will help you to send individual download requests with each pre-signed URL and theExponential backoff
retry mechanism will help retry failed downloads.You can also consider implementing Multithreading with this which can help you download files concurrently.