amazon web services - Connection to AWS timed out using Python boto -


i ran python program in cygwin connect aws, failed consistently being timed out. connection aws using aws cli in cygwin works. if run same python code in windows, works. have checked connection credentials same all.

here error msg:

traceback (most recent call last):     file "<stdin>", line 1, in <module>     file "/usr/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ec2/connection.py", line 585, in get_all_instances     max_results=max_results)      file "/usr/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ec2/connection.py", line 681, in get_all_reservations     [('item', reservation)], verb='post')      file "/usr/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/connection.py", line 1170, in get_list      response = self.make_request(action, params, path, verb)      file "/usr/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/connection.py", line 1116, in make_request     return self._mexe(http_request)      file "/usr/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/connection.py", line 1030, in _mexe     raise ex    socket.error: [errno 116] connection timed out 

i have found out culprit lies in proxy credentials.

i put http_proxy , https_proxy windows environment variables. however, when run in cygwin, boto uses 'http_proxy' match without considering case of word

(see  /boto/connection.py(669)handle_proxy() line 669:  if 'http_proxy' in os.environ , not self.proxy:).    

when changed capital case http_proxy lower case http_proxy, worked. not sure why isn't problem if run python in windows.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -