iosswiftamazon-web-servicesawss3transfermanagerawss3transferutility

AWSS3 What are the best strategies of bucket location for video uploading?


I have configured a bucket on Amazon and I use CloudFront. I upload images and videos on it.

Even though my videos are max 15 sec and I compress them (with AVAssetExportSession in AVAssetExportPreset640x480 format + shouldOptimizeForNetworkUse set to true) before sending them, it seems too long to upload (sometimes more than 1,5 min).

I was wondering if I should configure several buckets in several locations in the world in order to upload the user video to the nearest bucket and reduce the upload time.

Any other suggestion is very welcome.


Solution

  • Few things you can try:

    1. You can enable "S3 Transfer acceleration" on you s3 bucket. CloudFront is helpful when downloading/accessing images. This will help in uploading. This gives more benefit when bucket location is far off from uploading location.

    2. Second solution can be as u suggested.. And then you can create rules on bucket to automatically transfer to another Global bucket. But this makes upload asynchronus i.e. even though you have uploaded video into the bucket; still some users might not see video for some time. And this global bucket should be in region which is closes to your MOST users. Also, you need to use CloudFront here which connects to global bucket.