I am using Pre-Signed url (generated from our server), to upload to S3 bucket. Using URLSession background session to upload from file to signed URL.
What I have noticed is, if the video is bigger (more than 30 or 50 MB), the upload is really slow. My internet speed is decent with close to 300 Mbps also did real time speed testing and it was coming to >10 MBPS download and upload.
Here is how I am creating session and upload task from file,
let sessionConfiguration : URLSessionConfiguration = URLSessionConfiguration.background(withIdentifier: "SOME_REVERSE_DOMAIN_STRING.backgroundSession")
sessionConfiguration.allowsCellularAccess = true
let backgroundSession: URLSession = URLSession(configuration: sessionConfiguration,delegate: self,delegateQueue:OperationQueue.main)
Upload Task, a basic usage nothing fancy here:
uploadsSession.uploadTask(with: request, fromFile: fileUrl!)
task.resume()
Should I use AWS SDK or Amplify framework and upload? will it make any difference.