Tamás Szabó
Tamás Szabó

Reputation: 1418

AWS SDK - Template project fails with timeout

I'm trying to create a web application to work with the Amazon AWS API. Downloaded the Nuget package and created a project from the AWS Web Project template, ran it, and after a minute it failed with the following error message:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 54.239.39.130:443

The code failed at the last line of the following snippet:

IAmazonEC2 ec2Client = new AmazonEC2Client();               
var ec2Request = new DescribeInstancesRequest();
var ec2Response = ec2Client.DescribeInstances(ec2Request);

Now, the weird thing is that it works perfectly from the console, so I assume the issue is related to IIS Express running the application.

Any tip is welcome!

What I tried:

Upvotes: 1

Views: 127

Answers (1)

Paolo Demarchi
Paolo Demarchi

Reputation: 1

It happened the same to me. If you are under a proxy as I am, you may solve it by specifying aws proxy settings in config section in Web.config

<configSections>
    <section name="aws" type="Amazon.AWSSection, AWSSDK.Core"/>
</configSections>
<aws
    profileName="[yourprofilename]">
    <proxy host="[yourproxyIP/hostname]" port="[yourproxyport]" />
</aws>

Upvotes: 0

Related Questions