When using the AmazonS3
object for the first time after the application starts, there is a large delay of approx 14 seconds. This large time delay is not present for all subsequent calls.
I have encountered this exact delay issue before with other HTTP related classes and it is caused when the class in question tries to determine the local machine's proxy settings and whether to use them or not.
To stop this from happening with WebClient
, you set WebClient.Proxy = null;
and it doesn't try to auto detect the proxy settings, but I cannot figure out how to disable the proxy detection functionality of the AmazonS3
object.
I have specifically tried setting the ProxyHost
to null
:
_s3Client = AWSClientFactory.CreateAmazonS3Client(awsAccessKey, awsSecretAccessKey, new AmazonS3Config { ProxyHost = null });
Which didn't work. We are currently using the Amazon .NET SDK 'v1.3.17.0'.
Is there a way to turn off the proxy detection?