- Newest
- Most votes
- Most comments
This may not be what you're looking for, but I use python and you may be using the same functions on your front end, so this may help you. Not sure.
Here's what I'm doing:
mb = 1024 ** 2
config = TransferConfig(multipart_threshold=1024 * 25, max_concurrency=int(psutil.cpu_count() / 2),
multipart_chunksize=1024 * 25, use_threads=False)
try:
upload_file_response = s3.upload_file(source, destination, key, Config=config)
There's an article that mentions you can limit the bandwidth of the connection you're using in the TransferConfig class options. Here's that article: Again, this may or may not help you. Sorry if it doesn't.
Not sure what you are concerned about. Is it the fact that you need to generate 10-15 pre-signed URLs? What about it? The time it takes?
You can always generate all the URLs in a single API call. Also, if you are using Cognito user pools to authenticate the users, you can also associate an Identity pool, obtain AWS credentials on the client and generate the pre-signed URLs there, saving on the network round trip.
Finally, you can upload the files to Lambda that will save to S3. Not sure it will be quicker. Note that Lambda has a 6MB payload size limit.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
Adding: The only thing to watch out for here is the size of the payload in API Gateway - it's around 10MB.