Subject: | untrapped exception when connect to ec2.amazonaws.com timed out |
When I called describe_instances(), I got this exception:
File does not exist: 500 Can't connect to ec2.amazonaws.com:80 (connect:
timeout)
at /usr/lib/perl5/site_perl/5.8.8/Net/Amazon/EC2.pm line 163
Ideally all Net::Amazon::Ec2 functions should return an
Net::Amazon:Ec2:Errors object. But in this case, this didn't happen.
More information:
It seems that the LWP::UserAgent's get() function timed out. The
HTTP::Response object should contain this error and is_error() should
return true for this failed request. But it seems that
Net::Amazon::Ec2's _sign() function doesn't seem to be checking for such
errors from LWP's get() function. It should check for any LWP errors here.