Restore timeouts support when making calls to S3

Cherry-pick timeout commit to restore timeout functionality lost by 9232af374fd5567ae008bf24f7fac71037c26e36