S3 put_object returns {:error, :timeout} but uploads file correctly
Opened this issue · 5 comments
When putting larger files taking more than few seconds to upload, AWS.S3.put_object call returns {:error, :timeout}
even with timeout and recv_timeout configured
AWS.S3.put_object(client, bucket, file_name, %{"Body" => file, "ContentMD5" => md5}, [timeout: 50_000, recv_timeout: 50_000])
What is the correct way of executing request that takes longer to complete?
@pulzzedavid Ill try and poke around the Elixir codebase over the weekend to see if I can get a more detailed answer to your question but depending on how large of a file you're dealing with the recommendation from AWS would be to use multipart uploads. How big is the file you're trying to upload as AWS recommends multipart for anything more than 100GB.
Thanks @onno-vos-dev. I am using files between 5MB - 70MB in size
Sorry for dropping this... Could you try with something along the lines of: #168 (comment)
Would that resolve your issue? 🤔
I'm inconsistently seeing {:error, :timeout}
as well but during "regular" executions. For example, listing distributions.
For creating a Medialive for example, the medialive gets created, but I get a {:error, :timeout}
back, even though the resource was created.