Since the VM image size varies, there are 25 GB ones, and there are close to 40 GB ones, using one single timeout value may cause failure when downloading larger VM images, unless we use an arbitrary large timeout value. This PR sets the timeout based on the file size, calculated with an expected downloading speed of 10 MB/s.
I found out there is a .s3UseTransferAcceleratedEndpoint option in the soto library, so I made a small change while I'm changing this code.
(Hopefully this is the last PR to tweak the timeout value 😂)
Since the VM image size varies, there are 25 GB ones, and there are close to 40 GB ones, using one single timeout value may cause failure when downloading larger VM images, unless we use an arbitrary large timeout value. This PR sets the timeout based on the file size, calculated with an expected downloading speed of 10 MB/s.
I found out there is a
.s3UseTransferAcceleratedEndpoint
option in the soto library, so I made a small change while I'm changing this code.(Hopefully this is the last PR to tweak the timeout value 😂)